Date
2022-11-15.00:00:00
Message id
6964

Content

[Accepted as a DR at the November, 2022 meeting.]

Subclause 7.5.2 [expr.prim.literal] paragraph 1 specifies:

... A string-literal is an lvalue designating a corresponding string literal object (5.13.5 [lex.string]), a user-defined-literal has the same value category as the corresponding operator call expression described in 5.13.9 [lex.ext], and any other literal is a prvalue.

Yet, there is redundant specification in 5.13.2 [lex.icon] paragraph 3:

The type of an integer-literal is the first type in the list in Table 9 corresponding to its optional integer-suffix in which its value can be represented. An integer-literal is a prvalue.

And in 5.13.7 [lex.bool] paragraph 1:

The Boolean literals are the keywords false and true. Such literals are prvalues and have type bool.

And in 5.13.8 [lex.nullptr] paragraph 1:

The pointer literal is the keyword nullptr. It is a prvalue of type std::nullptr_t.