Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86172 - trunk/boost/functional/hash/detail
From: dnljms_at_[hidden]
Date: 2013-10-06 04:02:35


Author: danieljames
Date: 2013-10-06 04:02:35 EDT (Sun, 06 Oct 2013)
New Revision: 86172
URL: http://svn.boost.org/trac/boost/changeset/86172

Log:
Simplify SFINAE for largest float overload. Refs #8822.

I accidentally missed it out. Also fix the return values.

Text files modified:
   trunk/boost/functional/hash/detail/hash_float.hpp | 17 ++++++++---------
   1 files changed, 8 insertions(+), 9 deletions(-)

Modified: trunk/boost/functional/hash/detail/hash_float.hpp
==============================================================================
--- trunk/boost/functional/hash/detail/hash_float.hpp Sat Oct 5 21:24:41 2013 (r86171)
+++ trunk/boost/functional/hash/detail/hash_float.hpp 2013-10-06 04:02:35 EDT (Sun, 06 Oct 2013) (r86172)
@@ -103,7 +103,8 @@
         template <typename Float>
         inline std::size_t float_hash_impl(Float v,
             BOOST_DEDUCED_TYPENAME boost::enable_if_c<
- enable_binary_hash<Float, 24, 128>::value, int>::type)
+ enable_binary_hash<Float, 24, 128>::value,
+ std::size_t>::type)
         {
             return hash_binary((char*) &v, 4);
         }
@@ -112,7 +113,8 @@
         template <typename Float>
         inline std::size_t float_hash_impl(Float v,
             BOOST_DEDUCED_TYPENAME boost::enable_if_c<
- enable_binary_hash<Float, 53, 1024>::value, int>::type)
+ enable_binary_hash<Float, 53, 1024>::value,
+ std::size_t>::type)
         {
             return hash_binary((char*) &v, 8);
         }
@@ -120,7 +122,8 @@
         template <typename Float>
         inline std::size_t float_hash_impl(Float v,
             BOOST_DEDUCED_TYPENAME boost::enable_if_c<
- enable_binary_hash<Float, 64, 16384>::value, int>::type)
+ enable_binary_hash<Float, 64, 16384>::value,
+ std::size_t>::type)
         {
             return hash_binary((char*) &v, 10);
         }
@@ -128,12 +131,8 @@
         template <typename Float>
         inline std::size_t float_hash_impl(Float v,
             BOOST_DEDUCED_TYPENAME boost::enable_if_c<
- std::numeric_limits<Float>::is_iec559 &&
- std::numeric_limits<Float>::digits == 113 &&
- std::numeric_limits<Float>::radix == 2 &&
- std::numeric_limits<Float>::max_exponent == 16384,
- int>::type
- )
+ enable_binary_hash<Float, 113, 16384>::value,
+ std::size_t>::type)
         {
             return hash_binary((char*) &v, 16);
         }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk