diff --git a/include/boost/container_hash/hash.hpp b/include/boost/container_hash/hash.hpp index f58c9c8..b9dbf8e 100644 --- a/include/boost/container_hash/hash.hpp +++ b/include/boost/container_hash/hash.hpp @@ -344,12 +344,11 @@ namespace boost // pointer types - // Implementation by Alberto Barbati and Dave Harris. + // `x + (x >> 3)` adjustment by Alberto Barbati and Dave Harris. template std::size_t hash_value( T* const& v ) { - std::size_t x = static_cast( - reinterpret_cast(v)); - return x + (x >> 3); + boost::uintptr_t x = reinterpret_cast( v ); + return boost::hash_value( x + (x >> 3) ); } // array types