unsigned < 0

bearophile bearophileHUGS at lycos.com
Thu Feb 10 18:44:55 PST 2011


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

That's not good enough yet. The first part of the test needs to be done in a static if.

Bye,
bearophile


More information about the Digitalmars-d mailing list