I think this could be integrated into "to" template without need for extra symbols. There are tons of optimization opportunities like this, that are currently not being utilized. If the result won't change, then the release version should drop safety checks.
... IMO ... On Thu, Nov 3, 2011 at 1:40 AM, Martin Nowak <[email protected]> wrote: > 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 >
