C++ Basic Type Keywords 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