Description
Originally posted by @xmh0511 in #4837 (comment) and #4798.
Currently [dcl.constexpr] p10 says that in the defintion of a constexpr
variable, the "full-expression of the initialization" shall be a constant expression. And according to [expr.const] p1, a constant expression is also an expression.
However, the "full-expression of the initialization" of a variable may be not an expression. It seems that "full-expression of the initialization" of a variable corresponds to the case specified in [intro.execution] p5 (5.4): an init-declarator (or a mem-initializer) is not an expression.
Note that [expr.const] p2 (2.2) uses "when interpretd as", which may imply that the "full-expression of its initialization" is not itself an expression.
Perhaps there are some contradictions currently, and we should clarify that
- the full-expression of initialization of a variable is not itself an expression (and hence not a constant expression), and
- how to "interpret" an initialization as an expression.