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]/12 optional conversion #1597

Closed
brevzin opened this issue Apr 5, 2017 · 2 comments
Closed

[expr]/12 optional conversion #1597

brevzin opened this issue Apr 5, 2017 · 2 comments
Assignees

Comments

@brevzin
Copy link
Contributor

brevzin commented Apr 5, 2017

The wording currently reads:

If the expression is a prvalue after this optional conversion, the temporary materialization conversion is applied.

"this optional conversion" refers to the lvalue-to-rvalue conversion. Optional isn't a good word here, since the conversion itself is mandatory - just only conditionally applied. Maybe "If this conversion is applied and the resulting expression is a prvalue, the temporary materialization conversion is applied"? Or something along those lines.

@timsong-cpp
Copy link
Contributor

The proposed rewording is incorrect. Materialization applies to all discarded prvalues, whether the prvalue is because the expression started off as a prvalue or because the lvalue-to-rvalue conversion was applied by the previous sentence to a volatile-qualified glvalue.

@brevzin
Copy link
Contributor Author

brevzin commented Apr 6, 2017

"If the expression was a prvalue, or becomes a prvalue after applying the lvalue-to-rvalue conversion, the temporary materialization conversion is applied." ? "The temporary materialization conversion is applied if, after applying the lvalue-to-rvalue conversion if necessary, the expression is a prvalue."? "after conditionally applying the lvalue-to-rvalue conversion"?

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

No branches or pull requests

3 participants