checkedTo

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Thu Nov 3 02:38:44 PDT 2011


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 <dawg at dawgfoto.de> 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
>


More information about the Digitalmars-d mailing list