C++ char32_t


Example

C++11

An unsigned integer type with the same size and alignment as uint_least32_t, which is therefore large enough to hold a UTF-32 code unit.

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