Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64869 - in branches/release: boost/functional/hash libs/functional/hash
From: dnljms_at_[hidden]
Date: 2010-08-17 16:00:19


Author: danieljames
Date: 2010-08-17 16:00:17 EDT (Tue, 17 Aug 2010)
New Revision: 64869
URL: http://svn.boost.org/trac/boost/changeset/64869

Log:
Merge OpenVMS 64 bit patch for hash. Fixes #4477.

Properties modified:
   branches/release/boost/functional/hash/ (props changed)
   branches/release/libs/functional/hash/ (props changed)
Text files modified:
   branches/release/boost/functional/hash/hash.hpp | 8 +++++++-
   1 files changed, 7 insertions(+), 1 deletions(-)

Modified: branches/release/boost/functional/hash/hash.hpp
==============================================================================
--- branches/release/boost/functional/hash/hash.hpp (original)
+++ branches/release/boost/functional/hash/hash.hpp 2010-08-17 16:00:17 EDT (Tue, 17 Aug 2010)
@@ -209,9 +209,15 @@
     template <class T> 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<std::size_t>(
+ reinterpret_cast<long long int>(v));
+#else
         std::size_t x = static_cast<std::size_t>(
            reinterpret_cast<std::ptrdiff_t>(v));
-
+#endif
         return x + (x >> 3);
     }
 


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