diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/functional/hash | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/functional/hash')
7 files changed, 249 insertions, 187 deletions
diff --git a/3rdParty/Boost/src/boost/functional/hash/detail/container_fwd_0x.hpp b/3rdParty/Boost/src/boost/functional/hash/detail/container_fwd_0x.hpp deleted file mode 100644 index bed7730..0000000 --- a/3rdParty/Boost/src/boost/functional/hash/detail/container_fwd_0x.hpp +++ /dev/null @@ -1,29 +0,0 @@ - -// Copyright 2012 Daniel James. -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#if !defined(BOOST_DETAIL_CONTAINER_FWD_0X_HPP) -#define BOOST_DETAIL_CONTAINER_FWD_0X_HPP - -#include <boost/detail/container_fwd.hpp> - -// std::array - -#if !defined(BOOST_NO_CXX11_HDR_ARRAY) -# include <array> -#endif - -// std::tuple - -#if !defined(BOOST_NO_CXX11_HDR_TUPLE) -# include <tuple> -#endif - -// std::shared_ptr/std::unique_ptr - -#if !defined(BOOST_NO_CXX11_HDR_MEMORY) -# include <memory> -#endif - -#endif diff --git a/3rdParty/Boost/src/boost/functional/hash/detail/float_functions.hpp b/3rdParty/Boost/src/boost/functional/hash/detail/float_functions.hpp index ae03ff0..f3db52f 100644 --- a/3rdParty/Boost/src/boost/functional/hash/detail/float_functions.hpp +++ b/3rdParty/Boost/src/boost/functional/hash/detail/float_functions.hpp @@ -7,12 +7,100 @@ #define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP #include <boost/config.hpp> +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + #include <boost/config/no_tr1/cmath.hpp> -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +// Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have +// sufficiently good floating point support to not require any +// workarounds. +// +// When set to 0, the library tries to automatically +// use the best available implementation. This normally works well, but +// breaks when ambiguities are created by odd namespacing of the functions. +// +// Note that if this is set to 0, the library should still take full +// advantage of the platform's floating point support. + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__LIBCOMO__) +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +// Rogue Wave library: +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(_LIBCPP_VERSION) +// libc++ +# define BOOST_HASH_CONFORMANT_FLOATS 1 +#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) +// GNU libstdc++ 3 +# if defined(__GNUC__) && __GNUC__ >= 4 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#elif defined(__STL_CONFIG_H) +// generic SGI STL +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__MSL_CPP__) +// MSL standard lib: +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif defined(__IBMCPP__) +// VACPP std lib (probably conformant for much earlier version). +# if __IBMCPP__ >= 1210 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#elif defined(MSIPL_COMPILE_H) +// Modena C++ standard library +# define BOOST_HASH_CONFORMANT_FLOATS 0 +#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +// Dinkumware Library (this has to appear after any possible replacement libraries): +# if _CPPLIB_VER >= 405 +# define BOOST_HASH_CONFORMANT_FLOATS 1 +# else +# define BOOST_HASH_CONFORMANT_FLOATS 0 +# endif +#else +# define BOOST_HASH_CONFORMANT_FLOATS 0 #endif +#if BOOST_HASH_CONFORMANT_FLOATS + +// The standard library is known to be compliant, so don't use the +// configuration mechanism. + +namespace boost { + namespace hash_detail { + template <typename Float> + struct call_ldexp { + typedef Float float_type; + inline Float operator()(Float x, int y) const { + return std::ldexp(x, y); + } + }; + + template <typename Float> + struct call_frexp { + typedef Float float_type; + inline Float operator()(Float x, int* y) const { + return std::frexp(x, y); + } + }; + + template <typename Float> + struct select_hash_type + { + typedef Float type; + }; + } +} + +#else // BOOST_HASH_CONFORMANT_FLOATS == 0 + // The C++ standard requires that the C float functions are overloarded // for float, double and long double in the std namespace, but some of the older // library implementations don't support this. On some that don't, the C99 @@ -243,4 +331,6 @@ namespace boost } } +#endif // BOOST_HASH_CONFORMANT_FLOATS + #endif diff --git a/3rdParty/Boost/src/boost/functional/hash/detail/hash_float.hpp b/3rdParty/Boost/src/boost/functional/hash/detail/hash_float.hpp index 3edc6ab..ee0ee87 100644 --- a/3rdParty/Boost/src/boost/functional/hash/detail/hash_float.hpp +++ b/3rdParty/Boost/src/boost/functional/hash/detail/hash_float.hpp @@ -6,11 +6,11 @@ #if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER) #define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +#include <boost/config.hpp> +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once #endif -#include <boost/config.hpp> #include <boost/functional/hash/detail/float_functions.hpp> #include <boost/functional/hash/detail/limits.hpp> #include <boost/utility/enable_if.hpp> @@ -73,7 +73,9 @@ namespace boost ptr += sizeof(std::size_t); while(length >= sizeof(std::size_t)) { - hash_float_combine(seed, *(std::size_t*) ptr); + std::size_t buffer = 0; + std::memcpy(&buffer, ptr, sizeof(std::size_t)); + hash_float_combine(seed, buffer); length -= sizeof(std::size_t); ptr += sizeof(std::size_t); } @@ -88,15 +90,21 @@ namespace boost return seed; } + template <typename Float, unsigned digits, unsigned max_exponent> + struct enable_binary_hash + { + BOOST_STATIC_CONSTANT(bool, value = + std::numeric_limits<Float>::is_iec559 && + std::numeric_limits<Float>::digits == digits && + std::numeric_limits<Float>::radix == 2 && + std::numeric_limits<Float>::max_exponent == max_exponent); + }; + template <typename Float> inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits<Float>::is_iec559 && - std::numeric_limits<Float>::digits == 24 && - std::numeric_limits<Float>::radix == 2 && - std::numeric_limits<Float>::max_exponent == 128, - int>::type - ) + enable_binary_hash<Float, 24, 128>::value, + std::size_t>::type) { return hash_binary((char*) &v, 4); } @@ -105,12 +113,8 @@ namespace boost template <typename Float> inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits<Float>::is_iec559 && - std::numeric_limits<Float>::digits == 53 && - std::numeric_limits<Float>::radix == 2 && - std::numeric_limits<Float>::max_exponent == 1024, - int>::type - ) + enable_binary_hash<Float, 53, 1024>::value, + std::size_t>::type) { return hash_binary((char*) &v, 8); } @@ -118,12 +122,8 @@ namespace boost template <typename Float> inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits<Float>::is_iec559 && - std::numeric_limits<Float>::digits == 64 && - std::numeric_limits<Float>::radix == 2 && - std::numeric_limits<Float>::max_exponent == 16384, - int>::type - ) + enable_binary_hash<Float, 64, 16384>::value, + std::size_t>::type) { return hash_binary((char*) &v, 10); } @@ -131,12 +131,8 @@ namespace boost template <typename Float> inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits<Float>::is_iec559 && - std::numeric_limits<Float>::digits == 113 && - std::numeric_limits<Float>::radix == 2 && - std::numeric_limits<Float>::max_exponent == 16384, - int>::type - ) + enable_binary_hash<Float, 113, 16384>::value, + std::size_t>::type) { return hash_binary((char*) &v, 16); } @@ -210,8 +206,15 @@ namespace boost template <class T> inline std::size_t float_hash_value(T v) { +#if defined(fpclassify) + switch (fpclassify(v)) +#elif BOOST_HASH_CONFORMANT_FLOATS + switch (std::fpclassify(v)) +#else using namespace std; - switch (fpclassify(v)) { + switch (fpclassify(v)) +#endif + { case FP_ZERO: return 0; case FP_INFINITE: diff --git a/3rdParty/Boost/src/boost/functional/hash/detail/limits.hpp b/3rdParty/Boost/src/boost/functional/hash/detail/limits.hpp index f5b520e..4a971a6 100644 --- a/3rdParty/Boost/src/boost/functional/hash/detail/limits.hpp +++ b/3rdParty/Boost/src/boost/functional/hash/detail/limits.hpp @@ -9,8 +9,9 @@ #if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER) #define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +#include <boost/config.hpp> +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once #endif #include <boost/limits.hpp> diff --git a/3rdParty/Boost/src/boost/functional/hash/extensions.hpp b/3rdParty/Boost/src/boost/functional/hash/extensions.hpp index 4358736..eafaefe 100644 --- a/3rdParty/Boost/src/boost/functional/hash/extensions.hpp +++ b/3rdParty/Boost/src/boost/functional/hash/extensions.hpp @@ -13,23 +13,32 @@ #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/functional/hash/detail/container_fwd_0x.hpp> +#include <boost/detail/container_fwd.hpp> #include <boost/utility/enable_if.hpp> #include <boost/static_assert.hpp> #include <boost/preprocessor/repetition/repeat_from_to.hpp> #include <boost/preprocessor/repetition/enum_params.hpp> -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +#if !defined(BOOST_NO_CXX11_HDR_ARRAY) +# include <array> #endif -#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) -#include <boost/type_traits/is_array.hpp> +#if !defined(BOOST_NO_CXX11_HDR_TUPLE) +# include <tuple> #endif -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -#include <boost/type_traits/is_const.hpp> +#if !defined(BOOST_NO_CXX11_HDR_MEMORY) +# include <memory> +#endif + +#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) +#include <boost/type_traits/is_array.hpp> #endif namespace boost @@ -149,7 +158,7 @@ namespace boost } } -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template <typename... T> inline std::size_t hash_value(std::tuple<T...> const& v) { @@ -220,11 +229,7 @@ namespace boost 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); @@ -286,8 +291,6 @@ namespace boost template <bool IsPointer> struct hash_impl; -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <> struct hash_impl<false> { @@ -308,58 +311,6 @@ namespace boost #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 } diff --git a/3rdParty/Boost/src/boost/functional/hash/hash.hpp b/3rdParty/Boost/src/boost/functional/hash/hash.hpp index 647fd68..3e5ab5b 100644 --- a/3rdParty/Boost/src/boost/functional/hash/hash.hpp +++ b/3rdParty/Boost/src/boost/functional/hash/hash.hpp @@ -1,11 +1,17 @@ -// Copyright 2005-2009 Daniel James. +// Copyright 2005-2014 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf // issue 6.18. +// +// This also contains public domain code from MurmurHash. From the +// MurmurHash header: + +// MurmurHash3 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. #if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP) #define BOOST_FUNCTIONAL_HASH_HASH_HPP @@ -16,7 +22,9 @@ #include <string> #include <boost/limits.hpp> #include <boost/type_traits/is_enum.hpp> +#include <boost/type_traits/is_integral.hpp> #include <boost/utility/enable_if.hpp> +#include <boost/cstdint.hpp> #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include <boost/type_traits/is_pointer.hpp> @@ -26,6 +34,17 @@ #include <typeindex> #endif +#if defined(BOOST_MSVC) +#pragma warning(push) + +#if BOOST_MSVC >= 1400 +#pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values + // are always of range '0' to '4294967295'. + // Loop executes infinitely. +#endif + +#endif + #if BOOST_WORKAROUND(__GNUC__, < 3) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) #define BOOST_HASH_CHAR_TRAITS string_char_traits @@ -33,6 +52,12 @@ #define BOOST_HASH_CHAR_TRAITS char_traits #endif +#if defined(_MSC_VER) +# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) _rotl(x,r) +#else +# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) (x << r) | (x >> (32 - r)) +#endif + namespace boost { namespace hash_detail @@ -40,8 +65,8 @@ namespace boost struct enable_hash_value { typedef std::size_t type; }; template <typename T> struct basic_numbers {}; - template <typename T> struct long_numbers {}; - template <typename T> struct ulong_numbers {}; + template <typename T> struct long_numbers; + template <typename T> struct ulong_numbers; template <typename T> struct float_numbers {}; template <> struct basic_numbers<bool> : @@ -70,6 +95,14 @@ namespace boost boost::hash_detail::enable_hash_value {}; #endif + // long_numbers is defined like this to allow for separate + // specialization for long_long and int128_type, in case + // they conflict. + template <typename T> struct long_numbers2 {}; + template <typename T> struct ulong_numbers2 {}; + template <typename T> struct long_numbers : long_numbers2<T> {}; + template <typename T> struct ulong_numbers : ulong_numbers2<T> {}; + #if !defined(BOOST_NO_LONG_LONG) template <> struct long_numbers<boost::long_long_type> : boost::hash_detail::enable_hash_value {}; @@ -77,6 +110,13 @@ namespace boost boost::hash_detail::enable_hash_value {}; #endif +#if defined(BOOST_HAS_INT128) + template <> struct long_numbers2<boost::int128_type> : + boost::hash_detail::enable_hash_value {}; + template <> struct ulong_numbers2<boost::uint128_type> : + boost::hash_detail::enable_hash_value {}; +#endif + template <> struct float_numbers<float> : boost::hash_detail::enable_hash_value {}; template <> struct float_numbers<double> : @@ -94,7 +134,7 @@ namespace boost template <typename T> typename boost::enable_if<boost::is_enum<T>, std::size_t>::type - hash_value(T); + hash_value(T); #if !BOOST_WORKAROUND(__DMC__, <= 0x848) template <class T> std::size_t hash_value(T* const&); @@ -165,6 +205,51 @@ namespace boost return seed; } + + template <typename SizeT> + inline void hash_combine_impl(SizeT& seed, SizeT value) + { + seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + + template <typename SizeT> + inline void hash_combine_impl(boost::uint32_t& h1, + boost::uint32_t k1) + { + const uint32_t c1 = 0xcc9e2d51; + const uint32_t c2 = 0x1b873593; + + k1 *= c1; + k1 = BOOST_FUNCTIONAL_HASH_ROTL32(k1,15); + k1 *= c2; + + h1 ^= k1; + h1 = BOOST_FUNCTIONAL_HASH_ROTL32(h1,13); + h1 = h1*5+0xe6546b64; + } + + +// Don't define 64-bit hash combine on platforms with 64 bit integers, +// and also not for 32-bit gcc as it warns about the 64-bit constant. +#if !defined(BOOST_NO_INT64_T) && \ + !(defined(__GNUC__) && ULONG_MAX == 0xffffffff) + + template <typename SizeT> + inline void hash_combine_impl(boost::uint64_t& h, + boost::uint64_t k) + { + const uint64_t m = UINT64_C(0xc6a4a7935bd1e995); + const int r = 47; + + k *= m; + k ^= k >> r; + k *= m; + + h ^= k; + h *= m; + } + +#endif // BOOST_NO_INT64_T } template <typename T> @@ -187,9 +272,9 @@ namespace boost template <typename T> typename boost::enable_if<boost::is_enum<T>, std::size_t>::type - hash_value(T v) + hash_value(T v) { - return static_cast<std::size_t>(v); + return static_cast<std::size_t>(v); } // Implementation by Alberto Barbati and Dave Harris. @@ -221,16 +306,11 @@ namespace boost #endif #endif -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <class T> - inline void hash_combine(std::size_t& seed, T& v) -#else template <class T> inline void hash_combine(std::size_t& seed, T const& v) -#endif { boost::hash<T> hasher; - seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2); + return boost::hash_detail::hash_combine_impl(seed, hasher(v)); } #if defined(BOOST_MSVC) @@ -335,7 +415,6 @@ namespace boost // // These are undefined later. -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) #define BOOST_HASH_SPECIALIZE(type) \ template <> struct hash<type> \ : public std::unary_function<type, std::size_t> \ @@ -355,45 +434,6 @@ namespace boost return boost::hash_value(v); \ } \ }; -#else -#define BOOST_HASH_SPECIALIZE(type) \ - template <> struct hash<type> \ - : public std::unary_function<type, std::size_t> \ - { \ - std::size_t operator()(type v) const \ - { \ - return boost::hash_value(v); \ - } \ - }; \ - \ - template <> struct hash<const type> \ - : public std::unary_function<const type, std::size_t> \ - { \ - std::size_t operator()(const type v) const \ - { \ - return boost::hash_value(v); \ - } \ - }; - -#define BOOST_HASH_SPECIALIZE_REF(type) \ - template <> struct hash<type> \ - : public std::unary_function<type, std::size_t> \ - { \ - std::size_t operator()(type const& v) const \ - { \ - return boost::hash_value(v); \ - } \ - }; \ - \ - template <> struct hash<const type> \ - : public std::unary_function<const type, std::size_t> \ - { \ - std::size_t operator()(type const& v) const \ - { \ - return boost::hash_value(v); \ - } \ - }; -#endif BOOST_HASH_SPECIALIZE(bool) BOOST_HASH_SPECIALIZE(char) @@ -423,6 +463,11 @@ namespace boost BOOST_HASH_SPECIALIZE(boost::ulong_long_type) #endif +#if defined(BOOST_HAS_INT128) + BOOST_HASH_SPECIALIZE(boost::int128_type) + BOOST_HASH_SPECIALIZE(boost::uint128_type) +#endif + #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) BOOST_HASH_SPECIALIZE(std::type_index) #endif @@ -496,6 +541,11 @@ namespace boost } #undef BOOST_HASH_CHAR_TRAITS +#undef BOOST_FUNCTIONAL_HASH_ROTL32 + +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif #endif // BOOST_FUNCTIONAL_HASH_HASH_HPP diff --git a/3rdParty/Boost/src/boost/functional/hash/hash_fwd.hpp b/3rdParty/Boost/src/boost/functional/hash/hash_fwd.hpp index 1d51b07..01fe012 100644 --- a/3rdParty/Boost/src/boost/functional/hash/hash_fwd.hpp +++ b/3rdParty/Boost/src/boost/functional/hash/hash_fwd.hpp @@ -10,11 +10,11 @@ #if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) #define BOOST_FUNCTIONAL_HASH_FWD_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +#include <boost/config.hpp> +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once #endif -#include <boost/config.hpp> #include <cstddef> #include <boost/detail/workaround.hpp> @@ -22,11 +22,7 @@ namespace boost { template <class T> struct hash; -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <class T> void hash_combine(std::size_t& seed, T& v); -#else template <class T> void hash_combine(std::size_t& seed, T const& v); -#endif template <class It> std::size_t hash_range(It, It); template <class It> void hash_range(std::size_t&, It, It); |