|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2007-10-14 17:52:12
Author: danieljames
Date: 2007-10-14 17:52:12 EDT (Sun, 14 Oct 2007)
New Revision: 40036
URL: http://svn.boost.org/trac/boost/changeset/40036
Log:
Sun C++ didn't like the function call, so just try inlining the implementation for now.
Text files modified:
trunk/boost/functional/hash/hash.hpp | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Modified: trunk/boost/functional/hash/hash.hpp
==============================================================================
--- trunk/boost/functional/hash/hash.hpp (original)
+++ trunk/boost/functional/hash/hash.hpp 2007-10-14 17:52:12 EDT (Sun, 14 Oct 2007)
@@ -474,7 +474,10 @@
#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
return boost::hash_value(v);
#else
- return boost::hash_value<T*>(v);
+ std::size_t x = static_cast<std::size_t>(
+ reinterpret_cast<std::ptrdiff_t>(v));
+
+ return x + (x >> 3);
#endif
}
};
@@ -496,7 +499,10 @@
#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590)
return boost::hash_value(val);
#else
- return boost::hash_value<T>(val);
+ std::size_t x = static_cast<std::size_t>(
+ reinterpret_cast<std::ptrdiff_t>(val));
+
+ return x + (x >> 3);
#endif
}
};
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