From 92e607de3493179b38a70e686bac305911fc9110 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 6 Oct 2013 08:02:35 +0000 Subject: [PATCH] Simplify SFINAE for largest float overload. Refs #8822. I accidentally missed it out. Also fix the return values. [SVN r86172] --- .../boost/functional/hash/detail/hash_float.hpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/include/boost/functional/hash/detail/hash_float.hpp b/include/boost/functional/hash/detail/hash_float.hpp index 7e71aa0..b2866f8 100644 --- a/include/boost/functional/hash/detail/hash_float.hpp +++ b/include/boost/functional/hash/detail/hash_float.hpp @@ -103,7 +103,8 @@ namespace boost template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - enable_binary_hash::value, int>::type) + enable_binary_hash::value, + std::size_t>::type) { return hash_binary((char*) &v, 4); } @@ -112,7 +113,8 @@ namespace boost template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - enable_binary_hash::value, int>::type) + enable_binary_hash::value, + std::size_t>::type) { return hash_binary((char*) &v, 8); } @@ -120,7 +122,8 @@ namespace boost template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - enable_binary_hash::value, int>::type) + enable_binary_hash::value, + std::size_t>::type) { return hash_binary((char*) &v, 10); } @@ -128,12 +131,8 @@ namespace boost template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits::is_iec559 && - std::numeric_limits::digits == 113 && - std::numeric_limits::radix == 2 && - std::numeric_limits::max_exponent == 16384, - int>::type - ) + enable_binary_hash::value, + std::size_t>::type) { return hash_binary((char*) &v, 16); }