This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Accepted as a DR at the July, 2019 meeting.]
The term “usable in constant expressions” (7.7 [expr.const] paragraph 3) is only defined for variables:
A variable is usable in constant expressions after its initializing declaration is encountered if it is a constexpr variable, or it is of reference type or of const-qualified integral or enumeration type, and its initializer is a constant initializer.
However, uses of the term assume that it applies more widely. For example, 7.7 [expr.const] bullet 4.7.1 mentions “a non-volatile glvalue that refers to an object that is usable in constant expressions” (not all objects are variables), and bullet 4.10.1 speaks of a “data member of reference type” (also not a variable) that is usable in constant expressions.
Proposed resolution, June, 2019:
Change 7.7 [expr.const] paragraph 3 as follows:
A variable is usable in constant expressions after its initializing declaration is encountered if it is a constexpr variable, or it is of reference type or of const-qualified integral or enumeration type, and its initializer is a constant initializer. An object or reference is usable in constant expressions if it is
a variable that is usable in constant expressions, or
a template parameter object (13.2 [temp.param]), or
a string literal object (5.13.5 [lex.string]), or
a non-mutable subobject or reference member of any of the above, or
a complete temporary object of non-volatile const-qualified integral or enumeration type that is initialized with a constant expression.