You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
call to a constexpr function produces the same result as a call to an equivalent non-constexpr function in all respects except that
a call to a constexpr function can appear in a constant expression (7.7) and [...]
One non-obvious consequence of this bullet is that because declaring a function constexpr can change whether some expressions are constant expressions, it can change the result of a call to std::is_constant_evaluated within such expressions, which can change the overall value of a call to that function in the context of such a constant expression.
A note to this effect in that bullet would help. ("[Note: This can indirectly cause calls to std::is_constant_evaluated() within an invocation of the function to produce a different value.]")
The text was updated successfully, but these errors were encountered:
Additional suggestion: talk about a "call to a constexpr function in a given context produces the same result as a call to an equivalent non-constexpr function in the same context in all respects". (The fact that the function is constexpr can affect the context, such as by making it manifestly constant evaluated, and we don't intend to constrain such changes here.)
And in passing change "call to" -> "invocation of".
[dcl.constexpr]/8 says:
One non-obvious consequence of this bullet is that because declaring a function
constexpr
can change whether some expressions are constant expressions, it can change the result of a call tostd::is_constant_evaluated
within such expressions, which can change the overall value of a call to that function in the context of such a constant expression.A note to this effect in that bullet would help. ("[Note: This can indirectly cause calls to
std::is_constant_evaluated()
within an invocation of the function to produce a different value.]")The text was updated successfully, but these errors were encountered: