mirror of
https://github.com/boostorg/functional.git
synced 2025-08-02 14:04:27 +02:00
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:
@@ -209,8 +209,13 @@ namespace boost
|
|||||||
template <class T> std::size_t hash_value(T* v)
|
template <class T> std::size_t hash_value(T* v)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
|
||||||
std::size_t x = static_cast<std::size_t>(
|
std::size_t x = static_cast<std::size_t>(
|
||||||
reinterpret_cast<std::ptrdiff_t>(v));
|
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);
|
return x + (x >> 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user