summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/functional')
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp8
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/hash.hpp6
2 files changed, 6 insertions, 8 deletions
diff --git a/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp b/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp
index f9acee9..fdbf53f 100644
--- a/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp
+++ b/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp
@@ -51,17 +51,15 @@ namespace boost
limits<T>::min_exponent;
}
- // The result of frexp is always between 0.5 and 1, so its
- // top bit will always be 1. Subtract by 0.5 to remove that.
- v -= T(0.5);
- v = ldexp(v, limits<std::size_t>::digits + 1);
+ v = ldexp(v, limits<std::size_t>::digits);
std::size_t seed = static_cast<std::size_t>(v);
v -= seed;
// ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
std::size_t const length
= (limits<T>::digits *
- boost::static_log2<limits<T>::radix>::value - 1)
+ boost::static_log2<limits<T>::radix>::value
+ + limits<std::size_t>::digits - 1)
/ limits<std::size_t>::digits;
for(std::size_t i = 0; i != length; ++i)
diff --git a/3rdParty/Boost/src/boost/functional/hash/hash.hpp b/3rdParty/Boost/src/boost/functional/hash/hash.hpp
index 1f33b9e..e85ca5a 100644
--- a/3rdParty/Boost/src/boost/functional/hash/hash.hpp
+++ b/3rdParty/Boost/src/boost/functional/hash/hash.hpp
@@ -44,7 +44,7 @@ namespace boost
std::size_t hash_value(wchar_t);
#endif
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
std::size_t hash_value(boost::long_long_type);
std::size_t hash_value(boost::ulong_long_type);
#endif
@@ -174,7 +174,7 @@ namespace boost
}
#endif
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
inline std::size_t hash_value(boost::long_long_type v)
{
return hash_detail::hash_value_signed(v);
@@ -408,7 +408,7 @@ namespace boost
BOOST_HASH_SPECIALIZE_REF(std::wstring)
#endif
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
BOOST_HASH_SPECIALIZE(boost::long_long_type)
BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
#endif