Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::literals Namespace Reference

Function Documentation

◆ operator""_asv()

auto arene::base::literals::operator""_asv ( detail::raw_c_string const str,
std::size_t const len ) -> string_view
constexprnoexcept

String literal operator to construct a string_view from an annotated string literal. This string_view operator is named "asv" (arene string view) to avoid any conflict with the sv operator in a third party code base.

Parameters
strA pointer to the start of the string literal characters
lenThe number of characters in the string literal
Returns
A string_view for the string literal

◆ operator""_byte()

byte arene::base::literals::operator""_byte ( unsigned long long int const value)
constexprnoexcept

Literal helper for creating byte instances.

Parameters
valueThe literal to cast to byte .
Returns
byte Equivalent to calling to_byte(value) .

◆ operator""_ntsv()

auto arene::base::literals::operator""_ntsv ( detail::raw_c_string const str,
std::size_t  ) -> null_terminated_string_view
constexprnoexcept

Construct a null-terminated string view from a string literal.

For example:

using namespace literals;
auto sv = "a null terminated string"_ntsv;
Definition null_terminated_string_view.hpp:420
Parameters
strPointer to the string literal.
Returns
The null_terminated_string_view referencing the string literal.