Names specified here
Name Description Notes Source Availability
__STDC_UTF_16__ Indicator of equivalence of char16_t and UTF-16 L ? M Predefined C11
ATOMIC_CHAR16_T_LOCK_FREE Lock-free property of type atomic_char16_t ? M <stdatomic.h> C11
atomic_char16_t Atomic character type ? T <stdatomic.h> C11
char16_t Potential 16-bit Unicode-character type ? T <uchar.h> C11

char16_t is an unsigned integer type of at least 16 bits, the same type that uint_least16_t is an alias of, so it has the range 0 to UINT_LEAST16_MAX, which is at least 65535. It is intended to hold characters encoded in UTF-16. However, this is only guaranteed if __STDC_UTF_16__ is predefined (which expands to 1 if it is).

The functions mbrtoc16 and c16rtomb can be used to convert between sequences of char16_t and char. Character constants of type char16_t take the form u'x'. String literals of type char16_t[] take the form u"abc".

atomic_char16_t is an alias for _Atomic char16_t. This type is lock-free always if ATOMIC_CHAR16_T_LOCK_FREE is 2, sometimes if 1, and never if 0.


CHaR
Sitemap Supported
Site format updated 2024-06-05T22:37:07.391+0000
Data updated 1970-01-01T00:00:00.000+0000
Page updated 2022-06-17T21:43:05.000+0000