@trusted and return ref

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 3 06:54:33 PST 2015


Unsafe!(int*)* _c;

class A
{
   Unsafe!(int*) _counter;
   void escape() @safe { _c = &_counter; }
}

Not sure if it's legal. It should be really untouchable.


More information about the Digitalmars-d-learn mailing list