From 46654045d7f175a05fe31b264498b6bb79db92c9 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 9 Jul 2006 22:50:43 +0000 Subject: [PATCH] Comment out an assert which is giving bogus failures. On platforms where it isn't possible to detect NaN or infinity the full hash computation is performed on them. For NaN the result doesn't matter (since NaN != NaN), for infinity it should always give the same result), so the calculation works but unfortuanately, I don't know how to correctly check that v is what I expect in the assertion. I could use a different hash function when I don't have fpclassify/fpclass but that shouldn't be necessary. [SVN r34490] --- include/boost/functional/detail/hash_float.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/functional/detail/hash_float.hpp b/include/boost/functional/detail/hash_float.hpp index 1dbe15e..ebdf966 100644 --- a/include/boost/functional/detail/hash_float.hpp +++ b/include/boost/functional/detail/hash_float.hpp @@ -59,7 +59,8 @@ namespace boost exp = ~exp; } - BOOST_ASSERT(0 <= v && v < 0.5); + // TODO: Of course, this doesn't pass when hashing infinity or NaN. + //BOOST_ASSERT(0 <= v && v < 0.5); v = boost::hash_detail::call_ldexp(v, std::numeric_limits::digits + 1);