summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-23 13:16:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-23 14:43:26 (GMT)
commit491ddd570a752cf9bda85933bed0c6942e39b1f9 (patch)
tree10c25c1be8cc08d0497df1dccd56a10fbb30beee /3rdParty/Boost/src/boost/variant/detail
parentda7d7a0ca71b80281aa9ff2526290b61ccb0cc60 (diff)
downloadswift-491ddd570a752cf9bda85933bed0c6942e39b1f9.zip
swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.tar.bz2
Update Boost to 1.52.0.
Change-Id: I1e56bea2600bf2ed9c5b3aba8c4f9d2a0f350e77
Diffstat (limited to '3rdParty/Boost/src/boost/variant/detail')
-rw-r--r--3rdParty/Boost/src/boost/variant/detail/apply_visitor_delayed.hpp4
-rw-r--r--3rdParty/Boost/src/boost/variant/detail/hash_variant.hpp48
-rw-r--r--3rdParty/Boost/src/boost/variant/detail/visitation_impl.hpp5
3 files changed, 53 insertions, 4 deletions
diff --git a/3rdParty/Boost/src/boost/variant/detail/apply_visitor_delayed.hpp b/3rdParty/Boost/src/boost/variant/detail/apply_visitor_delayed.hpp
index 2650508..5f5642b 100644
--- a/3rdParty/Boost/src/boost/variant/detail/apply_visitor_delayed.hpp
+++ b/3rdParty/Boost/src/boost/variant/detail/apply_visitor_delayed.hpp
@@ -58,7 +58,7 @@ public: // unary visitor interface
template <typename Visitable>
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- operator()(Visitable& visitable)
+ operator()(Visitable& visitable) const
{
return apply_visitor(visitor_, visitable);
}
@@ -67,7 +67,7 @@ public: // binary visitor interface
template <typename Visitable1, typename Visitable2>
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
- operator()(Visitable1& visitable1, Visitable2& visitable2)
+ operator()(Visitable1& visitable1, Visitable2& visitable2) const
{
return apply_visitor(visitor_, visitable1, visitable2);
}
diff --git a/3rdParty/Boost/src/boost/variant/detail/hash_variant.hpp b/3rdParty/Boost/src/boost/variant/detail/hash_variant.hpp
new file mode 100644
index 0000000..3da669e
--- /dev/null
+++ b/3rdParty/Boost/src/boost/variant/detail/hash_variant.hpp
@@ -0,0 +1,48 @@
+//-----------------------------------------------------------------------------
+// boost variant/detail/hash_variant.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2011
+// Antony Polukhin
+//
+// 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)
+
+
+#ifndef BOOST_HASH_VARIANT_FUNCTION_HPP
+#define BOOST_HASH_VARIANT_FUNCTION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/variant/variant_fwd.hpp>
+#include <boost/variant/static_visitor.hpp>
+#include <boost/variant/apply_visitor.hpp>
+#include <boost/functional/hash_fwd.hpp>
+
+namespace boost {
+
+ namespace detail { namespace variant {
+ struct variant_hasher: public boost::static_visitor<std::size_t> {
+ template <class T>
+ std::size_t operator()(T const& val) const {
+ using namespace boost;
+ hash<T> hasher;
+ return hasher(val);
+ }
+ };
+ }}
+
+ template < BOOST_VARIANT_ENUM_PARAMS(typename T) >
+ std::size_t hash_value(variant< BOOST_VARIANT_ENUM_PARAMS(T) > const& val) {
+ std::size_t seed = boost::apply_visitor(detail::variant::variant_hasher(), val);
+ hash_combine(seed, val.which());
+ return seed;
+ }
+}
+
+#endif
+
diff --git a/3rdParty/Boost/src/boost/variant/detail/visitation_impl.hpp b/3rdParty/Boost/src/boost/variant/detail/visitation_impl.hpp
index 0d4271a..9cc3015 100644
--- a/3rdParty/Boost/src/boost/variant/detail/visitation_impl.hpp
+++ b/3rdParty/Boost/src/boost/variant/detail/visitation_impl.hpp
@@ -167,7 +167,7 @@ visitation_impl_invoke(
, has_nothrow_copy<T>
>::type never_uses_backup;
- return visitation_impl_invoke_impl(
+ return (visitation_impl_invoke_impl)(
internal_which, visitor, storage, t
, never_uses_backup()
);
@@ -246,7 +246,7 @@ visitation_impl(
// ...applying the appropriate case:
# define BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE(z, N, _) \
case (Which::value + (N)): \
- return visitation_impl_invoke( \
+ return (visitation_impl_invoke)( \
internal_which, visitor, storage \
, static_cast<BOOST_PP_CAT(T,N)*>(0) \
, no_backup_flag, 1L \
@@ -261,6 +261,7 @@ visitation_impl(
# undef BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE
+ default: break;
}
// If not handled in this iteration, continue unrolling: