diff --git a/test/hash_float_test.cpp b/test/hash_float_test.cpp index 09839a5..fab15e6 100644 --- a/test/hash_float_test.cpp +++ b/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)); }