Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2007-10-11 13:12:25


Author: danieljames
Date: 2007-10-11 13:12:24 EDT (Thu, 11 Oct 2007)
New Revision: 39935
URL: http://svn.boost.org/trac/boost/changeset/39935

Log:
Try to fix function pointer hashing for the sun compiler. A bit of a stab in
the dark.

Text files modified:
   trunk/boost/functional/hash/hash.hpp | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: trunk/boost/functional/hash/hash.hpp
==============================================================================
--- trunk/boost/functional/hash/hash.hpp (original)
+++ trunk/boost/functional/hash/hash.hpp 2007-10-11 13:12:24 EDT (Thu, 11 Oct 2007)
@@ -209,8 +209,13 @@
     template <class T> std::size_t hash_value(T* v)
 #endif
     {
+#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
         std::size_t x = static_cast<std::size_t>(
            reinterpret_cast<std::ptrdiff_t>(v));
+#else
+ std::size_t x = static_cast<std::size_t>(
+ reinterpret_cast<void*>(v));
+#endif
         return x + (x >> 3);
     }
 


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