[temp.dep.constexpr] (original) (raw)

13 Templates [temp]

13.8 Name resolution [temp.res]

13.8.2 Dependent names [temp.dep]

13.8.2.3 Value-dependent expressions [temp.dep.constexpr]

Except as described below, an expression used in a context where a constant expression is required is value-dependent if any subexpression is value-dependent.

Anid-expressionis value-dependent if:

Expressions of the following form are value-dependent if theunary-expression or expressionis type-dependent or thetype-idis dependent:

sizeof unary-expression sizeof ( type-id ) typeid ( expression ) typeid ( type-id ) alignof ( type-id ) noexcept ( expression )

An expression of the form &qualified-id where thequalified-id names a dependent member of the current instantiation is value-dependent.

An expression of the form &cast-expressionis also value-dependent if evaluating cast-expressionas a core constant expression succeeds and the result of the evaluation refers to a templated entity that is an object with static or thread storage duration or a member function.