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
As pointed by #4107, #3124, and #3587, the glvalue result is being unclear in the current draft. The glvalue result sometimes has the meaning(namely, anonymous reference) as mentioned in this comment #4107 (comment), but it's not normative wording. I think we should reword the wording for "glvalue result" of a function call to make it more clear. My suggestion is
if the function call is a prvalue, the return statement initializes the prvalue result object of the (explicit or implicit) function call by copy-initialization from the operand.
Otherwise, if the function call is a glvalue, the return statement is equivalent to the following hypothetical declaration
T t = e; if the operand of the return statement is a comma expression X without parenthesis, e is (X), otherwise e is X. T is the return type of the function call;
The invented variable t is the result of the function call.
Here, the invented variable t is the so-called anonymous reference for purpose.
The text was updated successfully, but these errors were encountered:
xmh0511
changed the title
Reword the glvalue result of a function call
Reword the wording for glvalue result of a function call
Jun 28, 2021
jensmaurer
changed the title
Reword the wording for glvalue result of a function call
Reword the wording for glvalue result of a function call CWG2495
Aug 12, 2021
As pointed by #4107, #3124, and #3587, the glvalue result is being unclear in the current draft. The glvalue result sometimes has the meaning(namely, anonymous reference) as mentioned in this comment #4107 (comment), but it's not normative wording. I think we should reword the wording for "glvalue result" of a function call to make it more clear. My suggestion is
Here, the invented variable
t
is the so-called anonymous reference for purpose.The text was updated successfully, but these errors were encountered: