structs are now lvalues - what is with "auto ref"?
    Jonathan M Davis 
    jmdavisProg at gmx.com
       
    Mon Dec 24 12:28:28 PST 2012
    
    
  
On Monday, December 24, 2012 20:46:00 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)));
That's a pointer, not a ref. It's completely different. It's also @system, 
whereas ref is @safe.
- Jonathan M Davis
    
    
More information about the Digitalmars-d-learn
mailing list