summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/unordered/detail/extract_key.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-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/unordered/detail/extract_key.hpp')
-rw-r--r--3rdParty/Boost/src/boost/unordered/detail/extract_key.hpp80
1 files changed, 31 insertions, 49 deletions
diff --git a/3rdParty/Boost/src/boost/unordered/detail/extract_key.hpp b/3rdParty/Boost/src/boost/unordered/detail/extract_key.hpp
index 56a8532..d68a4a7 100644
--- a/3rdParty/Boost/src/boost/unordered/detail/extract_key.hpp
+++ b/3rdParty/Boost/src/boost/unordered/detail/extract_key.hpp
@@ -6,6 +6,11 @@
#ifndef BOOST_UNORDERED_DETAIL_EXTRACT_KEY_HPP_INCLUDED
#define BOOST_UNORDERED_DETAIL_EXTRACT_KEY_HPP_INCLUDED
+#include <boost/config.hpp>
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+#pragma once
+#endif
+
#include <boost/unordered/detail/table.hpp>
namespace boost {
@@ -56,30 +61,25 @@ namespace detail {
return no_key();
}
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
- template <class... Args>
- static no_key extract(Args const&...)
- {
- return no_key();
- }
-#else
template <class Arg>
static no_key extract(Arg const&)
{
return no_key();
}
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <class Arg1, class Arg2, class... Args>
+ static no_key extract(Arg1 const&, Arg2 const&, Args const&...)
+ {
+ return no_key();
+ }
+#else
template <class Arg1, class Arg2>
static no_key extract(Arg1 const&, Arg2 const&)
{
return no_key();
}
#endif
-
- static bool compare_mapped(value_type const&, value_type const&)
- {
- return true;
- }
};
template <class Key, class ValueType>
@@ -93,11 +93,6 @@ namespace detail {
return v.first;
}
- static key_type const& extract(key_type const& v)
- {
- return v;
- }
-
template <class Second>
static key_type const& extract(std::pair<key_type, Second> const& v)
{
@@ -111,21 +106,6 @@ namespace detail {
return v.first;
}
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
- template <class Arg1, class... Args>
- static key_type const& extract(key_type const& k,
- Arg1 const&, Args const&...)
- {
- return k;
- }
-
- template <class... Args>
- static no_key extract(Args const&...)
- {
- return no_key();
- }
-#else
-
template <class Arg1>
static key_type const& extract(key_type const& k, Arg1 const&)
{
@@ -143,19 +123,27 @@ namespace detail {
return no_key();
}
- template <class Arg, class Arg1>
- static no_key extract(Arg const&, Arg1 const&)
+ template <class Arg1, class Arg2>
+ static no_key extract(Arg1 const&, Arg2 const&)
+ {
+ return no_key();
+ }
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <class Arg1, class Arg2, class Arg3, class... Args>
+ static no_key extract(Arg1 const&, Arg2 const&, Arg3 const&,
+ Args const&...)
{
return no_key();
}
#endif
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#define BOOST_UNORDERED_KEY_FROM_TUPLE(namespace_) \
template <typename T2> \
static no_key extract(boost::unordered::piecewise_construct_t, \
- namespace_::tuple<> const&, BOOST_FWD_REF(T2)) \
+ namespace_ tuple<> const&, T2 const&) \
{ \
return no_key(); \
} \
@@ -163,17 +151,17 @@ namespace detail {
template <typename T, typename T2> \
static typename is_key<key_type, T>::type \
extract(boost::unordered::piecewise_construct_t, \
- namespace_::tuple<T> const& k, BOOST_FWD_REF(T2)) \
+ namespace_ tuple<T> const& k, T2 const&) \
{ \
return typename is_key<key_type, T>::type( \
- namespace_::get<0>(k)); \
+ namespace_ get<0>(k)); \
}
#else
#define BOOST_UNORDERED_KEY_FROM_TUPLE(namespace_) \
static no_key extract(boost::unordered::piecewise_construct_t, \
- namespace_::tuple<> const&) \
+ namespace_ tuple<> const&) \
{ \
return no_key(); \
} \
@@ -181,25 +169,19 @@ namespace detail {
template <typename T> \
static typename is_key<key_type, T>::type \
extract(boost::unordered::piecewise_construct_t, \
- namespace_::tuple<T> const& k) \
+ namespace_ tuple<T> const& k) \
{ \
return typename is_key<key_type, T>::type( \
- namespace_::get<0>(k)); \
+ namespace_ get<0>(k)); \
}
#endif
-BOOST_UNORDERED_KEY_FROM_TUPLE(boost)
+BOOST_UNORDERED_KEY_FROM_TUPLE(boost::)
#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
-BOOST_UNORDERED_KEY_FROM_TUPLE(std)
+BOOST_UNORDERED_KEY_FROM_TUPLE(std::)
#endif
-
-
- static bool compare_mapped(value_type const& x, value_type const& y)
- {
- return x.second == y.second;
- }
};
}}}