Open xmh0511 opened 1 year ago
I think fun(x)
already satisfies p16.2:
an immediate invocation that is not a constant expression and is not a subexpression of an immediate invocation.
In this example, we may say fun(x)
fall into p16.2, however, as exposed in the title, we didn't clearly say the operand of a function call.
Hmm... it seems that the term operand (other than unevaluated ones) is not properly defined via italic texts.
Full name of submitter (unless configured in github; will be published with the issue): Jim X
Consider this example:
The original rule in [expr.const] p13 in C++20 standard says:
However, this rule has been changed to [expr.const] p17
[expr.const] p16 says:
Since
fun(x)
is an immediate invocation, whether the rule applies to#1
is determined by whetherfun
is a subexpression offun(x)
, that is, whetherfun(x)
is an immediate-escalating expression. However, [intro.execution] p3Suggested Resolution
The alternative rule may intend to take the place of the original rule in C++20 to say
#1
is ill-formed. However, in the current wording, [expr.call] didn't tell whether the postfix-expression is the operand of the function call.