difference between x = Nullable.init and x.nullify

vit via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 2 22:52:55 PDT 2017


Hello,
What's the difference between x = Nullable!Test.init and 
x.nullify?


class Test{}

void test()pure nothrow{
     Nullable!Test x;

     x = Nullable!Test.init; //OK
     x.nullify;              //Error: function 
'std.typecons.Nullable!(Test).Nullable.nullify!().nullify' is not 
nothrow

}





More information about the Digitalmars-d-learn mailing list