bearophile can say "i told you so" (re uint->int implicit conv)

Jesse Phillips Jessekphillips+D at gmail.com
Fri Mar 29 12:49:36 PDT 2013


On Friday, 29 March 2013 at 19:38:32 UTC, Benjamin Thaut wrote:

> 2) The library needs something like an int_cast which checks 
> casts from one integer type to another and asserts / throws on 
> error.

uint value = 3408924;
auto v = std.conv.to!int(value);

Exception is thrown if an overflow occurs.


More information about the Digitalmars-d mailing list