From f1dfae87030169621ba7f5fe11f5200719a123b6 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 14 Oct 2007 21:52:12 +0000 Subject: [PATCH] Sun C++ didn't like the function call, so just try inlining the implementation for now. [SVN r40036] --- include/boost/functional/hash/hash.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 } };