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

the dark.


[SVN r39935]
This commit is contained in:
Daniel James
2007-10-11 17:12:24 +00:00
parent 59f532cc68
commit f637c9e8ce

View File

@@ -209,8 +209,13 @@ namespace boost
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);
}