X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=boost%2Frandom%2Fdetail%2Fsigned_unsigned_tools.hpp;h=988cfb84dbd1b5bbc775c972b6752adab80de2c6;hb=HEAD;hp=3c81cf49c1349918c40a4f11bbf1157724c995b7;hpb=a95154919f950f86de9104b2b9dcf1f0c7e83387;p=rsem.git diff --git a/boost/random/detail/signed_unsigned_tools.hpp b/boost/random/detail/signed_unsigned_tools.hpp index 3c81cf4..988cfb8 100644 --- a/boost/random/detail/signed_unsigned_tools.hpp +++ b/boost/random/detail/signed_unsigned_tools.hpp @@ -73,7 +73,7 @@ struct add if (y >= 0) return T2(x) + y; // y < 0 - if (x >= T1(-(y+1))) // result >= 0 after subtraction + if (x > T1(-(y+1))) // result >= 0 after subtraction // avoid the nasty two's complement edge case for y == min() return T2(x - T1(-(y+1)) - 1); // abs(x) < abs(y), thus T2 able to represent x