The
size of a
char32_t or wide string literal is the total number of
escape sequences,
universal-character-names, and other characters, plus
one for the terminating
U'\0' or
L'\0'. The size of a UTF-16 string
literal is the total number of escape sequences,
universal-character-names, and other characters, plus one for each
character requiring a surrogate pair, plus one for the terminating
u'\0'. [
Note 5:
The size of a
char16_t
string literal is the number of code units, not the number of
characters
. —
end note]
The size of a narrow string literal is
the total number of escape sequences and other characters, plus at least
one for the multibyte encoding of each
universal-character-name, plus
one for the terminating
'\0'.