char32 t

Version >= C++ 11

无符号整数类型,其大小和对齐方式与 uint_least32_t 相同,因此足以容纳 UTF-32 代码单元。

const char32_t full_house[] = U"🂣🂳🂨🂸🃈";               // non-BMP characters
std::cout << sizeof(full_house)/sizeof(char32_t) << "\n"; // prints 6