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