From 2f1946c5417cf2f9e14719a8fbf2ede8aeb35f3f Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 17 Aug 2010 20:00:17 +0000 Subject: [PATCH] Merge OpenVMS 64 bit patch for hash. Fixes #4477. [SVN r64869] --- include/boost/functional/hash/hash.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 108d3ed..0eedf7f 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -209,9 +209,15 @@ namespace boost template std::size_t hash_value(T* v) #endif { +#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 + // for some reason ptrdiff_t on OpenVMS compiler with + // 64 bit is not 64 bit !!! + std::size_t x = static_cast( + reinterpret_cast(v)); +#else std::size_t x = static_cast( reinterpret_cast(v)); - +#endif return x + (x >> 3); }