integer-literal other than decimal-literal | |||
none | int | int | |
long int | unsigned int | ||
long long int | long int | ||
unsigned long int | |||
long long int | |||
unsigned long long int | |||
u or U | unsigned int | unsigned int | |
unsigned long int | unsigned long int | ||
unsigned long long int | unsigned long long int | ||
l or L | long int | long int | |
long long int | unsigned long int | ||
long long int | |||
unsigned long long int | |||
Both u or U | unsigned long int | unsigned long int | |
and l or L | unsigned long long int | unsigned long long int | |
ll or LL | long long int | long long int | |
unsigned long long int | |||
Both u or U | unsigned long long int | unsigned long long int | |
and ll or LL | |||
z or Z | the signed integer type corresponding | the signed integer type | |
to std::size_t ([support.types.layout]) | corresponding to std::size_t | ||
std::size_t | |||
Both u or U | std::size_t | std::size_t | |
and z or Z |
Encoding | Kind | Type | Associated char- | Example | |
prefix | acter encoding | ||||
none | char | encoding of | 'v' | ||
non-encodable ordinary character literal | int | the execution | '\U0001F525' | ||
ordinary multicharacter literal | int | character set | 'abcd' | ||
L | wchar_t | encoding of | L'w' | ||
non-encodable wide character literal | wchar_t | the execution | L'\U0001F32A' | ||
wide multicharacter literal | wchar_t | wide-character set | L'abcd' | ||
u8 | char8_t | UTF-8 | u8'x' | ||
u | char16_t | UTF-16 | u'y' | ||
U | char32_t | UTF-32 | U'z' |
type | ||
none | double | |
f or F | float | |
l or L | long double |
Encoding | Kind | Type | Associated | Examples | |
prefix | character encoding | ||||
none | array of n const char | encoding of the execution character set | "ordinary string" R"(ordinary raw string)" | ||
L | array of n const wchar_t | encoding of the execution wide-character set | L"wide string" LR"w(wide raw string)w" | ||
u8 | array of n const char8_t | UTF-8 | u8"UTF-8 string" u8R"x(UTF-8 raw string)x" | ||
u | array of n const char16_t | UTF-16 | u"UTF-16 string" uR"y(UTF-16 raw string)y" | ||
U | array of n const char32_t | UTF-32 | U"UTF-32 string" UR"z(UTF-32 raw string)z" |