From a4d9b52094098474d1ba3772ca20e7b6ccdec6b4 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 11 Jun 2006 14:52:55 +0000 Subject: [PATCH] Improve support for floating point types with radix != 2. [SVN r34272] --- include/boost/functional/detail/hash_float.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/functional/detail/hash_float.hpp b/include/boost/functional/detail/hash_float.hpp index 07d19c3..5699b7e 100644 --- a/include/boost/functional/detail/hash_float.hpp +++ b/include/boost/functional/detail/hash_float.hpp @@ -15,6 +15,7 @@ #endif #include +#include #include #include #include @@ -55,7 +56,8 @@ namespace boost std::size_t seed = 0; std::size_t const length - = (std::numeric_limits::digits + + = (std::numeric_limits::digits * + boost::static_log2::radix>::value + std::numeric_limits::digits - 1) / std::numeric_limits::digits;