On 02/15/2014 08:34 PM, Jesse Phillips wrote:
But mutating a mutable address is still valid, so as long as _you_
guarantee the address is not immutable, no it won't format your harddrive.

class C{ bool doit = true; }
void foo(const(C) c)pure{ (cast()C).doit = false; }

void main(){
    auto c = new C;
    writeln(c.doit);
    foo(c);
    if(c.doit) formatHardDrive();
}

Reply via email to