
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 03 May 2010, vicente.botet wrote:
I know perfectly how std::numeric_limits is designed. I'm just saying that if XInt defines std::numeric_limits<boost::xint::integer>::max() as 0, no generic code can make use of this.
Couldn't generic code also check is_bounded? This page http://msdn.microsoft.com/en-us/library/69bwfeks(VS.80).aspx says the return value of numeric_limits::min/max only has to be meaningful if is_bounded is true, etc. I assume that's taken from the standard, but haven't checked. Speaking of numeric_limits, anyone know why they defined numeric_limits::min() to mean something completely different for floating and integer types? numeric_limits<double>::min is: 2.22507e-308 numeric_limits<int>::min is: -2147483648 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkvfKgcACgkQ5vihyNWuA4Vu6QCfVJWVzvT1U2WUa4y6gXDTj0Wt FfMAoL6wH1guFtU0LWwGv1Ot/UMeGhx0 =gVKc -----END PGP SIGNATURE-----