Open
Description
Successive characters of the value of the string-literal initialize the elements of the array.
Since P2314 introduces a clear concept about "code unit", which is an integer value of a character type that is the type of the element of the character arrays. So, this outdated wording should be improved
Successive code unit values of the string-literal initialize the elements of the array.
Metadata
Metadata
Assignees
Labels
No labels
Activity
jensmaurer commentedon Nov 20, 2021
The problem is that [lex.string] only creates a sequence of code unit values if we initialize a string literal object, but that doesn't appear in [dcl.init.string].
See the pull request.
xmh0511 commentedon Nov 21, 2021
@jensmaurer I think the following modification may be clearer.
This can stress that every element of the array is a container that saves the code unit value. [lex.charset] p5 implies this point but it is not exposed in the initialization of the character array.
The character type is exactly the type of the element of the array.