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/mpl/assert.hpp | |
| parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
| download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-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/mpl/assert.hpp')
| -rw-r--r-- | 3rdParty/Boost/src/boost/mpl/assert.hpp | 79 | 
1 files changed, 74 insertions, 5 deletions
| diff --git a/3rdParty/Boost/src/boost/mpl/assert.hpp b/3rdParty/Boost/src/boost/mpl/assert.hpp index acc3954..4d860a4 100644 --- a/3rdParty/Boost/src/boost/mpl/assert.hpp +++ b/3rdParty/Boost/src/boost/mpl/assert.hpp @@ -11,7 +11,7 @@  // See http://www.boost.org/libs/mpl for documentation. -// $Id: assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$  #include <boost/mpl/not.hpp> @@ -26,4 +26,5 @@  #include <boost/mpl/aux_/config/gcc.hpp>  #include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/gpu.hpp>  #include <boost/mpl/aux_/config/static_constant.hpp>  #include <boost/mpl/aux_/config/pp_counter.hpp> @@ -35,4 +36,7 @@  #include <cstddef> +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) +#include <boost/mpl/if.hpp> +#endif  #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ @@ -53,5 +57,5 @@  // at a function scope)  #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ -    || (BOOST_MPL_CFG_GCC != 0) +    || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0)  #   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }  #else @@ -132,6 +136,36 @@ template< assert_::relations r, long x, long y > struct assert_relation {};  #endif  +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) + +template<class Pred> +struct extract_assert_pred; + +template<class Pred> +struct extract_assert_pred<void(Pred)> { typedef Pred type; }; + +template<class Pred> +struct eval_assert { +    typedef typename extract_assert_pred<Pred>::type P; +    typedef typename P::type p_type; +    typedef typename ::boost::mpl::if_c<p_type::value, +        AUX778076_ASSERT_ARG(assert<false>), +        failed ************ P::************ +    >::type type; +}; + +template<class Pred> +struct eval_assert_not { +    typedef typename extract_assert_pred<Pred>::type P; +    typedef typename P::type p_type; +    typedef typename ::boost::mpl::if_c<!p_type::value, +        AUX778076_ASSERT_ARG(assert<false>), +        failed ************ ::boost::mpl::not_<P>::************ +    >::type type; +}; + +template< typename T > +T make_assert_arg(); -#if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +#elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)  template< bool > struct assert_arg_pred_impl { typedef int type; }; @@ -212,4 +246,37 @@ assert_rel_arg( assert_relation<r,x,y> );  BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) + +// BOOST_MPL_ASSERT((pred<x,...>)) + +#define BOOST_MPL_ASSERT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +          boost::mpl::assertion_failed<false>( \ +              boost::mpl::make_assert_arg< \ +                  typename boost::mpl::eval_assert<void pred>::type \ +                >() \ +            ) \ +        ) \ +    ) \ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred<x,...>)) + +#define BOOST_MPL_ASSERT_NOT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ +      std::size_t \ +    , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ +          boost::mpl::assertion_failed<false>( \ +              boost::mpl::make_assert_arg< \ +                  typename boost::mpl::eval_assert_not<void pred>::type \ +                >() \ +            ) \ +        ) \ +    ) \ +/**/ + +#else  // BOOST_MPL_ASSERT((pred<x,...>)) @@ -251,4 +318,6 @@ BOOST_MPL_AUX_ASSERT_CONSTANT( \  #endif +#endif +  // BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) | 
 Swift
 Swift