checkedTo

Martin Nowak dawg at dawgfoto.de
Wed Nov 2 14:40:20 PDT 2011


I often write snippets like this for narrowing numerical conversions.

debug
     return to!T(exp);
else
     return cast(T)exp;

How about adding a construct for this to std.conv?
Could be checkedTo!T(val).

martin


More information about the Digitalmars-d mailing list