问题
Ago, Some rules in the standard that say they are applied to expression, I was confused about whether these rules can also be applied to full-expression arbitrarily. I get an answers in that question. However, there are some rules like "the full-expression of the initialization shall be a constant expression. " in the standard. Such as:
dcl.constexpr#9
basic.start.static#2
They all say that the full-expression must be a constant expression in these above links.
The prior condition for a constant expression is it must be a core constant expression. We know these rules in expr.const#2 are applied to expression, not to full-expression.
An expression e is a core constant expression unless the evaluation of e, following the rules of the abstract machine, would evaluate one of the following expressions:
So how to determine whether a full-expression is a constant expression? Or, the sentence in the standard means that these expressions within the full-expression all must be constant expressions?
来源:https://stackoverflow.com/questions/62078530/how-to-understand-the-sentence-full-expression-must-be-a-constant-expression-w