static assert(__traits(compiles, () => 10.some)); static assert(is(typeof(() { return 10.some; } ()) == Some!int)); static assert(__traits(compiles, function Optional!int () => 10.some));
See Implementation