Why is int implicitly convertible to ulong?

Hannes Steffenhagen cubicentertain at gmail.com
Sun Feb 16 13:35:01 PST 2014


isImplicitlyConvertible!(int,ulong) is true. Maybe this is just 
me, but I get the impression that this is quite nuts. Why is an 
implicit conversion from a signed to an unsigned type possible? 
The other way round would be at least somewhat understandable if 
there's a static check that the values actually fit.


More information about the Digitalmars-d mailing list