Skip to content

P2362R3 Remove non-encodable wide character literals and multicharacter wide character literals #5653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions source/lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@
more than one \grammarterm{c-char}.
The \grammarterm{encoding-prefix} of
a non-encodable character literal or a multicharacter literal
shall be absent or \tcode{L}.
shall be absent.
Such \grammarterm{character-literal}s are conditionally-supported.

\pnum
Expand All @@ -1367,17 +1367,17 @@
as defined by \tref{lex.ccon.literal}.
The special cases for
non-encodable character literals and multicharacter literals
take precedence over their respective base kinds.
take precedence over the base kind.
\begin{note}
The associated character encoding for ordinary and wide character literals
The associated character encoding for ordinary character literals
determines encodability,
but does not determine the value of
non-encodable ordinary or wide character literals or
ordinary or wide multicharacter literals.
non-encodable ordinary character literals or
ordinary multicharacter literals.
The examples in \tref{lex.ccon.literal}
for non-encodable ordinary and wide character literals assume that
for non-encodable ordinary character literals assume that
the specified character lacks representation in
the ordinary literal encoding or wide literal encoding, respectively, or
the ordinary literal encoding or
that encoding the character would require more than one code unit.
\end{note}

Expand Down Expand Up @@ -1405,18 +1405,9 @@
\tcode{L} &
\defnx{wide character literal}{literal!character!wide} &
\keyword{wchar_t} &
wide &
\tcode{L'w'} \\ \cline{2-3}\cline{5-5}
&
non-encodable wide character literal &
\keyword{wchar_t} &
literal &
\tcode{L'\textbackslash U0001F32A'} \\ \cline{2-3}\cline{5-5}
&
wide multicharacter literal &
\keyword{wchar_t} &
encoding &
\tcode{L'abcd'} \\ \hline
wide literal &
\tcode{L'w'} \\
& & & encoding & \\ \hline
\tcode{u8} &
\defnx{UTF-8 character literal}{literal!character!UTF-8} &
\keyword{char8_t} &
Expand Down