From 5274643417f06ddb19bd78b35b3301c459b79163 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 1 Apr 2005 22:49:19 +0000 Subject: [PATCH] Stop using 'std::denorm_present' as on many compilers it isn't present itself. [SVN r27916] --- hash/test/hash_float_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hash/test/hash_float_test.cpp b/hash/test/hash_float_test.cpp index 09839a5..fab15e6 100644 --- a/hash/test/hash_float_test.cpp +++ b/hash/test/hash_float_test.cpp @@ -51,7 +51,9 @@ void float_tests(T* = 0) // My hash fails this one, I guess it's not that bad. BOOST_WARN(x1(infinity) != x1(minus_infinity)); - if(std::numeric_limits::has_denorm == denorm_present) { + // This should really be 'has_denorm == denorm_present' but some + // compilers don't have 'denorm_present'. See also a leter use. + if(std::numeric_limits::has_denorm) { BOOST_CHECK(x1(std::numeric_limits::denorm_min()) != x1(infinity)); BOOST_CHECK(x1(std::numeric_limits::denorm_min()) != x1(minus_infinity)); } @@ -85,7 +87,8 @@ void float_tests(T* = 0) BOOST_CHECK(x1(std::numeric_limits::epsilon()) != x1((T) 0)); - if(std::numeric_limits::has_denorm == denorm_present) { + // As before. + if(std::numeric_limits::has_denorm) { BOOST_CHECK(x1(std::numeric_limits::denorm_min()) != x1(zero)); }