scope(exit) without exception handling?

Mehrdad wfunction at hotmail.com
Wed May 16 13:41:06 PDT 2012


Oh, and I just invented a most *lovely* cast:  :P

auto noThrow(T)(scope T function() t) nothrow
{ return (cast(T function() nothrow)t)(); }

auto noThrow(T)(scope T delegate() t) nothrow
{ return (cast(T delegate() nothrow)t)(); }


More information about the Digitalmars-d mailing list