From f637c9e8ce5f613ee6dc27cc6e6179bf88ab3520 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 11 Oct 2007 17:12:24 +0000 Subject: [PATCH] Try to fix function pointer hashing for the sun compiler. A bit of a stab in the dark. [SVN r39935] --- include/boost/functional/hash/hash.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 3f2b5fc..4927a01 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -209,8 +209,13 @@ namespace boost template std::size_t hash_value(T* v) #endif { +#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) std::size_t x = static_cast( reinterpret_cast(v)); +#else + std::size_t x = static_cast( + reinterpret_cast(v)); +#endif return x + (x >> 3); }