[英]Is a naked char32_t signed or unsigned?
Similarly, is a naked char16_t
signed or unsigned?同样,裸
char16_t
是有符号的还是无符号的? Is it implementation defined?是否定义了实现?
From the standard (pre-C++11 draft n3290, or post-C++11 draft n3337) §3.9.1 Fundamental types :从标准(前 C++11 草案 n3290,或后 C++11 草案 n3337)§3.9.1基本类型:
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.类型
char16_t
和char32_t
分别表示在<stdint.h>
与uint_least16_t
和uint_least32_t
具有相同大小、符号和对齐的不同类型,称为基础类型。
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
. uint_least16_t
和uint_least32_t
都是无符号的(来自 §18.4.1 Header <cstdint>
概要),因此char16_t
和char32_t
相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.