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/variant/get.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/variant/get.hpp')
-rw-r--r--3rdParty/Boost/src/boost/variant/get.hpp72
1 files changed, 16 insertions, 56 deletions
diff --git a/3rdParty/Boost/src/boost/variant/get.hpp b/3rdParty/Boost/src/boost/variant/get.hpp
index 99a65f6..e3302c0 100644
--- a/3rdParty/Boost/src/boost/variant/get.hpp
+++ b/3rdParty/Boost/src/boost/variant/get.hpp
@@ -17,18 +17,13 @@
#include "boost/config.hpp"
#include "boost/detail/workaround.hpp"
+#include "boost/throw_exception.hpp"
#include "boost/utility/addressof.hpp"
#include "boost/variant/variant_fwd.hpp"
#include "boost/type_traits/add_reference.hpp"
#include "boost/type_traits/add_pointer.hpp"
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-# include "boost/mpl/bool.hpp"
-# include "boost/mpl/or.hpp"
-# include "boost/type_traits/is_same.hpp"
-#endif
-
namespace boost {
//////////////////////////////////////////////////////////////////////////
@@ -36,12 +31,12 @@ namespace boost {
//
// The exception thrown in the event of a failed get of a value.
//
-class bad_get
+class BOOST_SYMBOL_VISIBLE bad_get
: public std::exception
{
public: // std::exception implementation
- virtual const char * what() const throw()
+ virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
{
return "boost::bad_get: "
"failed value get using boost::get";
@@ -77,62 +72,27 @@ public: // visitor typedefs
public: // visitor interfaces
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-
- pointer operator()(reference operand) const
- {
- return boost::addressof(operand);
- }
-
- template <typename U>
- pointer operator()(const U&) const
- {
- return static_cast<pointer>(0);
- }
-
-#else // MSVC6
-
-private: // helpers, for visitor interfaces (below)
-
- pointer execute_impl(reference operand, mpl::true_) const
+ pointer operator()(reference operand) const BOOST_NOEXCEPT
{
return boost::addressof(operand);
}
template <typename U>
- pointer execute_impl(const U& operand, mpl::false_) const
+ pointer operator()(const U&) const BOOST_NOEXCEPT
{
return static_cast<pointer>(0);
}
-
-public: // visitor interfaces
-
- template <typename U>
- pointer operator()(U& operand) const
- {
- // MSVC6 finds normal implementation (above) ambiguous,
- // so we must explicitly disambiguate
-
- typedef typename mpl::or_<
- is_same<U, T>
- , is_same<const U, T>
- >::type U_is_T;
-
- return execute_impl(operand, U_is_T());
- }
-
-#endif // MSVC6 workaround
-
};
}} // namespace detail::variant
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
-# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
- BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
-#else
-# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
- , t* = 0
+#ifndef BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE
+# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
+# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t)
+# else
+# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
+ , t* = 0
+# endif
#endif
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
@@ -141,7 +101,7 @@ inline
get(
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >* operand
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
- )
+ ) BOOST_NOEXCEPT
{
typedef typename add_pointer<U>::type U_ptr;
if (!operand) return static_cast<U_ptr>(0);
@@ -156,7 +116,7 @@ inline
get(
const boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >* operand
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
- )
+ ) BOOST_NOEXCEPT
{
typedef typename add_pointer<const U>::type U_ptr;
if (!operand) return static_cast<U_ptr>(0);
@@ -177,7 +137,7 @@ get(
U_ptr result = get<U>(&operand);
if (!result)
- throw bad_get();
+ boost::throw_exception(bad_get());
return *result;
}
@@ -193,7 +153,7 @@ get(
U_ptr result = get<const U>(&operand);
if (!result)
- throw bad_get();
+ boost::throw_exception(bad_get());
return *result;
}