Skip to content

Commit 568c342

Browse files
burblebeetkoeppe
authored andcommitted
CWG2641 Redundant specification of value category of literals
1 parent 3f33361 commit 568c342

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

source/lex.tex

+6-3
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,10 @@
11731173
pointer-literal\br
11741174
user-defined-literal
11751175
\end{bnf}
1176+
\begin{note}
1177+
When appearing as an \grammarterm{expression},
1178+
a literal has a type and a value category\iref{expr.prim.literal}.
1179+
\end{note}
11761180

11771181
\rSec2[lex.icon]{Integer literals}
11781182

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

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

21652168
\rSec2[lex.nullptr]{Pointer literals}
21662169

@@ -2171,7 +2174,7 @@
21712174
\end{bnf}
21722175

21732176
\pnum
2174-
The pointer literal is the keyword \keyword{nullptr}. It is a prvalue of type
2177+
The pointer literal is the keyword \keyword{nullptr}. It has type
21752178
\tcode{std::nullptr_t}.
21762179
\begin{note}
21772180
\tcode{std::nullptr_t} is a distinct type that is neither a pointer type nor a pointer-to-member type;

0 commit comments

Comments
 (0)