Skip to content

Commit

Permalink
[dcl.init.string] reword character array initialization
Browse files Browse the repository at this point in the history
nest const in tcode

Co-authored-by: Johel Ernesto Guerrero Peña <[email protected]>

fix stray 'a'

Co-authored-by: Johel Ernesto Guerrero Peña <[email protected]>

fix semantic changes

itemize instead
  • Loading branch information
Eisenwave committed Aug 21, 2023
1 parent a272b7c commit 0bb4a1e
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5425,27 +5425,23 @@
\indextext{UTF-8}%
\indextext{UTF-16}%
\indextext{UTF-32}%
An array of ordinary character type\iref{basic.fundamental},
\keyword{char8_t} array,
\keyword{char16_t} array,
\keyword{char32_t} array,
or \keyword{wchar_t} array
may be initialized by
an ordinary string literal,
UTF-8 string literal,
UTF-16 string literal,
UTF-32 string literal, or
wide string literal,
respectively, or by an appropriately-typed \grammarterm{string-literal} enclosed in
braces\iref{lex.string}.
Additionally, an array of \keyword{char} or
\tcode{\keyword{unsigned} \keyword{char}}
may be initialized by
a UTF-8 string literal, or by
such a string literal enclosed in braces.
Arrays of the following types may be initialized by an
optionally brace-enclosed \grammarterm{string-literal}:
\begin{itemize}
\item An array of ordinary character type\iref{basic.fundamental}
may be initialized by an ordinary string literal.
\item An array of \keyword{wchar_t}
may be initialized by a wide string literal.
\item An array of \keyword{char8_t}, \keyword{char},
or of \tcode{\keyword{unsigned} \keyword{char}}
may be initialized by a UTF-8 string literal.
\item An array of \keyword{char16_t}
may be initialized by a UTF-16 string literal.
\item An array of \keyword{char32_t}
may be initialized by a UTF-32 string literal.
\end{itemize}
\indextext{initialization!character array}%
Successive
characters of the
Successive characters of the
value of the \grammarterm{string-literal}
initialize the elements of the array,
with an integral conversion\iref{conv.integral}
Expand Down

0 comments on commit 0bb4a1e

Please sign in to comment.