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 | ordinary literal | 'v' | |
multicharacter literal | int | encoding | 'abcd' | |
L | wchar_t | wide literal | L'w' | |
encoding | ||||
u8 | char8_t | UTF-8 | u8'x' | |
u | char16_t | UTF-16 | u'y' | |
U | char32_t | UTF-32 | U'z' |
character | ||
U+000a | line feed | \n |
U+0009 | character tabulation | \t |
U+000b | line tabulation | \v |
U+0008 | backspace | \b |
U+000d | carriage return | \r |
U+000c | form feed | \f |
U+0007 | alert | \a |
U+005c | reverse solidus | \\ |
U+003f | question mark | \? |
U+0027 | apostrophe | \' |
U+0022 | quotation mark | \" |
type | |
none | double |
f or F | float |
l or L | long double |
f16 or F16 | std::float16_t |
f32 or F32 | std::float32_t |
f64 or F64 | std::float64_t |
f128 or F128 | std::float128_t |
bf16 or BF16 | std::bfloat16_t |
Enco- | Kind | Type | Associated | Examples |
ding | character | |||
prefix | encoding | |||
none | array of n const char | ordinary literal encoding | "ordinary string" R"(ordinary raw string)" | |
L | array of n const wchar_t | wide literal encoding | 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" |