== Quote from bearophile (bearophileh...@lycos.com)'s article > > 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
You also need to watch out for code like this too: if (T.min < 0) { ... As that could possibly trigger off unsigned < 0 warnings too. Regards Iain