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

[class.temporary]/1: prvalue can't be materialized, it is an expression #2305

Closed
languagelawyer opened this issue Aug 23, 2018 · 4 comments
Closed
Assignees

Comments

@languagelawyer
Copy link
Contributor

languagelawyer commented Aug 23, 2018

Temporary objects are created
— when a prvalue is materialized so that it can be used as a glvalue ([conv.rval]),

Suggested fix:

— when a prvalue is converted to an xvalue ([conv.rval]),

Also, I think the colon should be placed before the list of cases.

@cpplearner
Copy link
Contributor

Why an expression can't be materialized?

@languagelawyer
Copy link
Contributor Author

[conv.rval] is titled "Temporary materialization conversion". The only temporaries we have in this document are temporary objects. "temporary expression" is a meaningless combination of words which will be dropped (reported by you, BTW).
[class.temporary]/1 is the only place I've found which says "a prvalue is materialized". All other places say either "a temporary object is materialized" or "the temporary materialization conversion is applied".

@cpplearner
Copy link
Contributor

My understanding is that temporaries are the product of materialization, so "a temporary is materialized" and "a prvalue is materialized (to produce a temporary)" both make sense.

@languagelawyer
Copy link
Contributor Author

I agree that there is no absolute argument showing that one can't use such a wording.
But it is used only in one place, other places say "a temporary object is materialized".

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