summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-14 18:35:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-14 18:35:17 (GMT)
commita135c6ff4dcded5661a2321512960b14cf8c15c8 (patch)
treeb0017ecfe702304f592b9d4e8b943784cff26fb2 /3rdParty/Boost/src/boost/functional
parent02d6188ab335e6c62b8341b84579d9549d215118 (diff)
downloadswift-a135c6ff4dcded5661a2321512960b14cf8c15c8.zip
swift-a135c6ff4dcded5661a2321512960b14cf8c15c8.tar.bz2
Updated Boost to 1.46.1.
This should hopefuily fix a hang on shutdown on Mac OS X. Resolves: #782 Release-Notes: Fixed a potential hang on shutdown on Mac OS X.
Diffstat (limited to '3rdParty/Boost/src/boost/functional')
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp4
-rw-r--r--3rdParty/Boost/src/boost/functional/hash/hash.hpp23
2 files changed, 23 insertions, 4 deletions
diff --git a/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp b/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp
index fdbf53f..1278c2f 100644
--- a/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp
+++ b/3rdParty/Boost/src/boost/functional/hash/detail/hash_float_generic.hpp
@@ -53,7 +53,7 @@ namespace boost
v = ldexp(v, limits<std::size_t>::digits);
std::size_t seed = static_cast<std::size_t>(v);
- v -= seed;
+ v -= static_cast<T>(seed);
// ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
std::size_t const length
@@ -66,7 +66,7 @@ namespace boost
{
v = ldexp(v, limits<std::size_t>::digits);
std::size_t part = static_cast<std::size_t>(v);
- v -= part;
+ v -= static_cast<T>(part);
hash_float_combine(seed, part);
}
diff --git a/3rdParty/Boost/src/boost/functional/hash/hash.hpp b/3rdParty/Boost/src/boost/functional/hash/hash.hpp
index 0eedf7f..51ec860 100644
--- a/3rdParty/Boost/src/boost/functional/hash/hash.hpp
+++ b/3rdParty/Boost/src/boost/functional/hash/hash.hpp
@@ -24,6 +24,10 @@
#include <boost/type_traits/is_pointer.hpp>
#endif
+#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+#include <typeindex>
+#endif
+
#if BOOST_WORKAROUND(__GNUC__, < 3) \
&& !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
#define BOOST_HASH_CHAR_TRAITS string_char_traits
@@ -87,6 +91,10 @@ namespace boost
std::size_t hash_value(
std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
+#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+ std::size_t hash_value(std::type_index);
+#endif
+
// Implementation
namespace hash_detail
@@ -210,8 +218,8 @@ namespace boost
#endif
{
#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
- // for some reason ptrdiff_t on OpenVMS compiler with
- // 64 bit is not 64 bit !!!
+ // 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
@@ -331,6 +339,13 @@ namespace boost
return boost::hash_detail::float_hash_value(v);
}
+#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+ inline std::size_t hash_value(std::type_index v)
+ {
+ return v.hash_code();
+ }
+#endif
+
//
// boost::hash
//
@@ -435,6 +450,10 @@ namespace boost
BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
#endif
+#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+ BOOST_HASH_SPECIALIZE(std::type_index)
+#endif
+
#undef BOOST_HASH_SPECIALIZE
#undef BOOST_HASH_SPECIALIZE_REF