Mercurial > hg > vamp-build-and-test
diff DEPENDENCIES/generic/include/boost/functional/hash/extensions.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/functional/hash/extensions.hpp Fri Sep 04 12:01:02 2015 +0100 +++ b/DEPENDENCIES/generic/include/boost/functional/hash/extensions.hpp Mon Sep 07 11:12:49 2015 +0100 @@ -13,6 +13,11 @@ #if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) #define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP +#include <boost/config.hpp> +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + #include <boost/functional/hash/hash.hpp> #include <boost/detail/container_fwd.hpp> #include <boost/utility/enable_if.hpp> @@ -32,18 +37,10 @@ # include <memory> #endif -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) #include <boost/type_traits/is_array.hpp> #endif -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -#include <boost/type_traits/is_const.hpp> -#endif - namespace boost { template <class A, class B> @@ -232,11 +229,7 @@ template <class Array> struct inner { -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) static std::size_t call(Array const& v) -#else - static std::size_t call(Array& v) -#endif { const int size = sizeof(v) / sizeof(*v); return boost::hash_range(v, v + size); @@ -298,8 +291,6 @@ template <bool IsPointer> struct hash_impl; -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <> struct hash_impl<false> { @@ -320,58 +311,6 @@ #endif }; }; - -#else // Visual C++ 6.5 - - // Visual C++ 6.5 has problems with nested member functions and - // applying const to const types in templates. So we get this: - - template <bool IsConst> - struct hash_impl_msvc - { - template <class T> - struct inner - : public std::unary_function<T, std::size_t> - { - std::size_t operator()(T const& val) const - { - return hash_detail::call_hash<T const>::call(val); - } - - std::size_t operator()(T& val) const - { - return hash_detail::call_hash<T>::call(val); - } - }; - }; - - template <> - struct hash_impl_msvc<true> - { - template <class T> - struct inner - : public std::unary_function<T, std::size_t> - { - std::size_t operator()(T& val) const - { - return hash_detail::call_hash<T>::call(val); - } - }; - }; - - template <class T> - struct hash_impl_msvc2 - : public hash_impl_msvc<boost::is_const<T>::value> - ::BOOST_NESTED_TEMPLATE inner<T> {}; - - template <> - struct hash_impl<false> - { - template <class T> - struct inner : public hash_impl_msvc2<T> {}; - }; - -#endif // Visual C++ 6.5 } #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }