static assert(__traits(compiles, () => none)); static assert(is(typeof(() { return none; } ()) == None)); static assert(__traits(compiles, function Optional!int () => none));
See Implementation