Similarly, is a naked char16_t
signed or unsigned? Is it implementation defined?
Asked
Active
Viewed 2,118 times
15

templatetypedef
- 362,284
- 104
- 897
- 1,065

Samuel Edwin Ward
- 6,526
- 3
- 34
- 62
1 Answers
20
From the standard (pre-C++11 draft n3290, or post-C++11 draft n3337) §3.9.1 Fundamental types:
Types
char16_t
andchar32_t
denote distinct types with the same size, signedness, and alignment asuint_least16_t
anduint_least32_t
, respectively, in<stdint.h>
, called the underlying types.
uint_least16_t
and uint_least32_t
are both unsigned (from §18.4.1 Header <cstdint>
synopsis), so same for char16_t
and char32_t
.

Mat
- 202,337
- 40
- 393
- 406
-
Great! Could you specify which draft you are referring to? (N3337?) – Samuel Edwin Ward Mar 07 '13 at 18:43
-
I was looking at n3290, but n3337 has the same language exactly. – Mat Mar 07 '13 at 18:46