Call site 'ref'

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jan 15 16:35:04 PST 2012


On 1/15/12 6:30 PM, Peter Alexander wrote:
> On 15/01/12 11:56 PM, Jonathan M Davis wrote:
>> On Monday, January 16, 2012 00:41:14 Timon Gehr wrote:
>>> Well, struct literals are lvalues, at least in DMD.
>>
>> Yeah. I don't understand that. I've argued about it with Walter before.
>> Apparently they are in C++ as well. I don't understand it. It makes it
>> so that
>
> In C++, struct literals are rvalues. C++ just has a special rule that
> const references can bind to rvalues (but non-const references cannot),

That's a bad rule that we shouldn't copy.

Andrei


More information about the Digitalmars-d mailing list