
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/03/2010 07:37 PM, Scott McMurray wrote:
I was just providing some code pointing out why max and min had to be defined in numeric_limits<xint::integer>, even though they only return zeros.
And I was pointing out that, no, they don't *have* to be defined for generic code to work, since is_bounded is a compile-time constant, making it possible to not compile the max()- and min()-using code when it has value false.
Possible, yes -- but it relies on a Boost library to do so.
The standard seems to only talk about fundamental types having specializations, so it's unclear to me whether members that are not "meaningful" are meant to be provided or not.
It wouldn't be possible for your average developer to write generic code that did that sort of thing with only the standard library to work with. As such, and because GCC provides all members in all types, I read it that all numeric_limits specializations should provide all members. - -- Chad Nelson Oak Circle Software, Inc. * * * -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvfaHMACgkQp9x9jeZ9/wS5DACdF0i+E09M27GpLQiydxwu3XiQ sYEAn1HLlx/paplJWgM+YHfBLyphWTDL =u7Pv -----END PGP SIGNATURE-----