unsigned < 0

bearophile bearophileHUGS at lycos.com
Thu Feb 10 18:42:08 PST 2011


> Do you like this little change in the D2 language?

To avoid troubles in generic code you need a little workaround:
if (__traits(isUnsigned, x) || x >= 0) { ...

Bye,
bearophile


More information about the Digitalmars-d mailing list