default_code_unit_encoding

Picks the default encoding for the given code unit type (for both run time, and compile time with the appropriately selected version of this property). The default association table is below. Errors if there is no default association.

Note

User Specializations: ✔️ Okay! You can add other types to this classification by specializing the class template. Your specialization must have a type definition named type (as in, using type = ...; or typedef … type;`) inside of the class specialization that is public:ly accessible. Note that specializing any type not explicitly marked with this notice is ☢️☢️Undefined Behavior☢️☢️.

Type

Encoding

signed char

ztd::text::basic_ascii<signed char>

char

ztd::text::execution

char (compile time)

ztd::text::literal

wchar_t

ztd::text::wide_execution

wchar_t (compile time)

ztd::text::wide_literal

char8_t

ztd::text::basic_utf8<char8_t>

ztd::uchar8_t

ztd::text::basic_utf8<uchar8_t>

std::byte

ztd::text::basic_utf8<std::byte>

char16_t

ztd::text::utf16

char32_t

ztd::text::utf32

template<typename _Type>
class default_code_unit_encoding : public __default_code_unit_encoding<_Type, false>

The default encoding associated with a given code unit type, that serves as either input to a decode operation or output from an encode operation.

Template Parameters:

_Type – The code unit type, with no cv-qualifiers

template<typename _Type>
using ztd::text::default_code_unit_encoding_t = typename default_code_unit_encoding<_Type>::type

A typename alias for ztd::text::default_code_unit_encoding.

Template Parameters:

_Type – The code unit type, with no cv-qualifiers

template<typename _Type>
class default_consteval_code_unit_encoding : public __default_code_unit_encoding<_Type, true>

The default encoding associated with a given code unit type, that serves as either input to a decode operation or output from an encode operation. This uses the additional information that this is compiletime, not runtime, to help make the decision on what to do.

Template Parameters:

_Type – The code unit type, with no cv-qualifiers

template<typename _Type>
using ztd::text::default_consteval_code_unit_encoding_t = typename default_consteval_code_unit_encoding<_Type>::type

A typename alias for ztd::text::default_consteval_code_unit_encoding.

Template Parameters:

_Type – The code unit type, with no cv-qualifiers