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
Wrong comment in [intro.execution]/12's example #1650
Comments
AFAIK The comment probably does not contain what you expect it to say, but I personally don't think it is factually wrong. Just my two cents. |
This is not correct. There is no lvalue-to-rvalue conversion preceding the |
As far as I know, the standard conversion sequence from "lvalue of type |
You are right. The boolean conversion expects a prvalue and so, an lvalue-to-rvalue conversion is required before that. But again, the temporary materialization conversion is also required because of [expr.ref]/2. Thanks for the feedback. |
The comment is correct as written. The point of the example is to demonstrate that certain constructs occur before the temporary is destroyed; saying that the creation of the temporary is one of those things seems unnecessary to me. |
Why does this paragraph state that for this construct: "S s1(1)" "full-expression is call of S::S(int)"? Shouldn't the full expression be the entire construct itself (because it is an init-declarator)? It would make sense if the comment said: "full-expression contains call of S::S(int)". Am I not understanding something correctly? |
[intro.execution]/12:
The comment
above, should be replaced by
Note that the prvalue
S(3)
is subjected to a temporary-materialzation convertion to an xvalue. The dot(.) class member operator requires a glvalue as a postfix expression. See [expr.ref]/2.The text was updated successfully, but these errors were encountered: