const ref and rvalues

Trass3r un at known.com
Thu Feb 16 16:47:32 PST 2012


> Because then you _have_ to have a variable to call the function - except  
> for the bizarre situation that struct literals have where they're  
> considered
> lvalues (very bad idea IMHO). I think that from the perspective of most
> programmers, the fact that const ref doesn't take rvalues is a major  
> negative,
> even if Andrei is ultimately right (though I don't even remember what his
> reasoning is - I'm not sure that I've ever understod it).

I guess it's what I said earlier, temporaries don't necessarily have an  
address, e.g. being in a register.


More information about the Digitalmars-d mailing list