Skip to content

Commit

Permalink
CWG2641 Redundant specification of value category of literals
Browse files Browse the repository at this point in the history
  • Loading branch information
burblebee committed Nov 18, 2022
1 parent fa11999 commit f0018c5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,10 @@
pointer-literal\br
user-defined-literal
\end{bnf}
\begin{note}
When appearing as an \grammarterm{expression},
a literal has a type and a value category\iref{expr.prim.literal}.
\end{note}

\rSec2[lex.icon]{Integer literals}

Expand Down Expand Up @@ -1325,7 +1329,6 @@
the first type in the list in \tref{lex.icon.type}
corresponding to its optional \grammarterm{integer-suffix}
in which its value can be represented.
An \grammarterm{integer-literal} is a prvalue.

\begin{floattable}{Types of \grammarterm{integer-literal}s}{lex.icon.type}{l|l|l}
\topline
Expand Down Expand Up @@ -2160,7 +2163,7 @@
\pnum
\indextext{Boolean literal}%
The Boolean literals are the keywords \tcode{false} and \tcode{true}.
Such literals are prvalues and have type \tcode{bool}.
Such literals have type \tcode{bool}.

\rSec2[lex.nullptr]{Pointer literals}

Expand All @@ -2171,7 +2174,7 @@
\end{bnf}

\pnum
The pointer literal is the keyword \keyword{nullptr}. It is a prvalue of type
The pointer literal is the keyword \keyword{nullptr}. It has type
\tcode{std::nullptr_t}.
\begin{note}
\tcode{std::nullptr_t} is a distinct type that is neither a pointer type nor a pointer-to-member type;
Expand Down

0 comments on commit f0018c5

Please sign in to comment.