structs are now lvalues - what is with "auto ref"?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Dec 24 13:09:36 PST 2012


On 12/24/12 2:46 PM, anonymous wrote:
> On Monday, 24 December 2012 at 18:50:12 UTC, Jonathan M Davis wrote:
>> const int& i = foo(bar(min(5, 7)));
>>
>> which would allow a reference to be kept around, which D disallows.
>
> Does it?
>
> const(int)* i = &foo(bar(min(5, 7)));

We plan to forbid that.

Andrei


More information about the Digitalmars-d-learn mailing list