Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expr.comma] Remove "temporary expression" #3531

Merged
merged 1 commit into from Mar 4, 2020

Conversation

sdkrystian
Copy link
Contributor

[expr.comma] p1 sentence 5 says:

If the right operand is a temporary expression, the result is a temporary expression.

This is incorrect as no such grammar term exists, and if interpreted as meaning "xvalue", redundant.

@zygoloid
Copy link
Member

zygoloid commented Dec 19, 2019

I believe this wording is now redundant; the relevant normative rule is [class.temporary]/6.8.

@jensmaurer As I recall, "temporary expressions" came from your temporaries wording cleanup, can you check whether this is correct?

@jensmaurer
Copy link
Member

Yes, I think that's correct. My "temporary expression" cleanup was supposed to transport object identity through comma and ternary operators (and possibly more), but I think that's now totally redundant with the "mandatory copy elision" we have.

@zygoloid zygoloid merged commit b1343bc into cplusplus:master Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants