diff options
Diffstat (limited to '3rdParty/Boost/src/boost/functional')
-rw-r--r-- | 3rdParty/Boost/src/boost/functional/hash/hash.hpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/3rdParty/Boost/src/boost/functional/hash/hash.hpp b/3rdParty/Boost/src/boost/functional/hash/hash.hpp index e85ca5a..0eedf7f 100644 --- a/3rdParty/Boost/src/boost/functional/hash/hash.hpp +++ b/3rdParty/Boost/src/boost/functional/hash/hash.hpp @@ -16,6 +16,10 @@ #include <string> #include <boost/limits.hpp> +#if defined(BOOST_HASH_NO_IMPLICIT_CASTS) +#include <boost/static_assert.hpp> +#endif + #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include <boost/type_traits/is_pointer.hpp> #endif @@ -29,6 +33,18 @@ namespace boost { +#if defined(BOOST_HASH_NO_IMPLICIT_CASTS) + + // If you get a static assertion here, it's because hash_value + // isn't declared for your type. + template <typename T> + std::size_t hash_value(T const&) { + BOOST_STATIC_ASSERT((T*) 0 && false); + return 0; + } + +#endif + std::size_t hash_value(bool); std::size_t hash_value(char); std::size_t hash_value(unsigned char); @@ -193,9 +209,15 @@ namespace boost 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); } |