diff --git a/include/boost/functional/hash/extensions.hpp b/include/boost/functional/hash/extensions.hpp index eafaefe..ba34ca5 100644 --- a/include/boost/functional/hash/extensions.hpp +++ b/include/boost/functional/hash/extensions.hpp @@ -251,7 +251,6 @@ namespace boost // -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct hash : std::unary_function @@ -280,39 +279,6 @@ namespace boost }; #endif -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - // On compilers without partial specialization, boost::hash - // has already been declared to deal with pointers, so just - // need to supply the non-pointer version of hash_impl. - - namespace hash_detail - { - template - struct hash_impl; - - template <> - struct hash_impl - { - template - struct inner - : std::unary_function - { -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - std::size_t operator()(T const& val) const - { - return hash_value(val); - } -#else - std::size_t operator()(T const& val) const - { - return hash_detail::call_hash::call(val); - } -#endif - }; - }; - } -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } #endif diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 8a93171..e1aa245 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -409,7 +409,6 @@ namespace boost // Specializing boost::hash for pointers. -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct hash @@ -428,48 +427,6 @@ namespace boost } }; -#else - - // For compilers without partial specialization, we define a - // boost::hash for all remaining types. But hash_impl is only defined - // for pointers in 'extensions.hpp' - so when BOOST_HASH_NO_EXTENSIONS - // is defined there will still be a compile error for types not supported - // in the standard. - - namespace hash_detail - { - template - struct hash_impl; - - template <> - struct hash_impl - { - template - struct inner - : public std::unary_function - { - std::size_t operator()(T val) const - { -#if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590) - return boost::hash_value(val); -#else - std::size_t x = static_cast( - reinterpret_cast(val)); - - return x + (x >> 3); -#endif - } - }; - }; - } - - template struct hash - : public boost::hash_detail::hash_impl::value> - ::BOOST_NESTED_TEMPLATE inner - { - }; - -#endif } #if defined(BOOST_MSVC)