template <class charT> struct char_traits; template <> struct char_traits<char>; template <> struct char_traits<wchar_t>;
template <class charT> struct char_traits; template <> struct char_traits<char>; template <> struct char_traits<wchar_t>; template <> struct char_traits<char16_t>; template <> struct char_traits<char32_t>;
type | Description |
---|---|
char | Basic character set (size of 1 byte) |
wchar_t | Wide character set (same size, signedness, and alignment as another integral type) |
char | Basic character set (size of 1 byte) |
wchar_t | Widest character set (same size, signedness, and alignment as another integral type) |
char16_t | Represents 16-bit code units (same size, signedness, and alignment as uint_least16_t) |
char32_t | Represents any of the 32-bit code points (same size, signedness, and alignment as uint_least32_t) |
member type | description for character traits types | definition | |
---|---|---|---|
char | wchar_t | ||
char_type | The template parameter (charT) | char | wchar_t |
int_type | Integral type that can represent all charT values, as well as eof() | int | wint_t |
off_type | A type that behaves like streamoff | streamoff | streamoff |
pos_type | A type that behaves like streampos | streampos | wstreampos |
state_type | Multibyte transformation state type, such as mbstate_t | mbstate_t | mbstate_t |
member type | description for character traits types | definition | |||
---|---|---|---|---|---|
char | wchar_t | char16_t | char32_t | ||
char_type | The template parameter (charT) | char | wchar_t | char16_t | char32_t |
int_type | Integral type that can represent all charT values, as well as eof() | int | wint_t | uint_least16_t | uint_least32_t |
off_type | A type that behaves like streamoff | streamoff | streamoff | streamoff | streamoff |
pos_type | A type that behaves like streampos | streampos | wstreampos | u16streampos | u32streampos |
state_type | Multibyte transformation state type, such as mbstate_t | mbstate_t | mbstate_t | mbstate_t | mbstate_t |