On Thursday, August 18, 2011 13:33 Trass3r wrote:
> Am 18.08.2011, 22:19 Uhr, schrieb Jonathan M Davis <jmdavisp...@gmx.com>:
> > Yeah. I don't understand why a struct literal would be an lvalue. It's a
> > temporary. What possible value does it have? It's not a variable. It
> > doesn't
> > refer to a variable. Why would you be able to assign to anything which
> > is not
> > a variable (or indirectly refers to one - e.g. with ref)?
> 
> I don't understand it either.
> It only makes sense with const ref.

It doesn't even make sense with const ref IMHO - not unless you're going to 
allow const ref to be bound to temporaries in general. I see _zero_ reason to 
treat a newly constructed object as any different from one which is returned 
from a function. It just confuses things. And in a sense, a newly constructed 
object _is_ returned by a function, it's just that it's the constructor rather 
than a normal function.

- Jonathan M Davis

Reply via email to