diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 4244989..5515efd 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -474,7 +474,10 @@ namespace boost #if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) return boost::hash_value(v); #else - return boost::hash_value(v); + std::size_t x = static_cast( + reinterpret_cast(v)); + + return x + (x >> 3); #endif } }; @@ -496,7 +499,10 @@ namespace boost #if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590) return boost::hash_value(val); #else - return boost::hash_value(val); + std::size_t x = static_cast( + reinterpret_cast(val)); + + return x + (x >> 3); #endif } };