Steven Schveighoffer <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from Steven Schveighoffer <> 2011-06-29 
07:55:14 PDT ---
I think this bug is invalid.  A value-type return is an rvalue, and Andrei has
made it very clear in his posts and in TDPL that rvalues cannot be bound to
const ref parameters.  I think his reasoning is that this ability was a mistake
in C++, though I haven't gotten consistent answers as to why.

However, I cannot tell you what you are supposed to do -- I had thought that
auto ref was supposed to take care of this (i.e. you could bind an rvalue to an
auto ref parameter), but I've gotten mixed interpretations from Andrei on how
it is supposed to work.

The fact that it works with opCmp in one direction is I think a relaxation of
the rules, because struct returns would be near useless if you couldn't call
any methods on them.

I'll leave this up to Andrei or Walter to mark it invalid, in case I'm wrong.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to