Name | Description | Notes | Source | Availability | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
__STDC_ |
Indicator of equivalence of
char16_t and UTF-16 |
L | ? | M | Predefined | C11 | |||||
ATOMIC_ |
Lock-free property of type atomic_ |
? | M | <stdatomic.h> |
C11 | ||||||
atomic_ |
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_
is an alias of,
so it has the range 0
to UINT_
, which
is at least 65535
. It is intended to
hold characters
encoded in UTF-16. However, this is only guaranteed if
__STDC_
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_
is an alias for _Atomic
char16_t
. This type is lock-free always if
ATOMIC_
is
2
, sometimes if 1
, and never if 0
.