diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-05-06 17:44:27 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-05-06 17:44:27 (GMT) |
commit | d76ada0ab59634e3333f9eb5a92d0e850f60d7bf (patch) | |
tree | 5eaae441173fad2ec19ba67d6589f28ecd740991 /3rdParty/Boost/src/boost/mpl | |
parent | 6f49e5abee37d37b351d68c01374232eccdac458 (diff) | |
download | swift-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.zip swift-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.tar.bz2 |
Updated Boost to 1.43.0.
Diffstat (limited to '3rdParty/Boost/src/boost/mpl')
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp | 8 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/aux_/template_arity.hpp | 8 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/aux_/unwrap.hpp | 47 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/for_each.hpp | 116 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/is_sequence.hpp | 112 |
5 files changed, 6 insertions, 285 deletions
diff --git a/3rdParty/Boost/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/3rdParty/Boost/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp index 3e7bfba..daec4b8 100644 --- a/3rdParty/Boost/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp +++ b/3rdParty/Boost/src/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp @@ -6,11 +6,10 @@ // http://www.boost.org/LICENSE_1_0.txt) // -// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// *Preprocessed* version of the main "template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { - template< int N > struct arity_tag { typedef char (&type)[N + 1]; @@ -23,7 +22,6 @@ struct max_arity { BOOST_STATIC_CONSTANT(int, value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) - ); }; @@ -83,7 +81,7 @@ template< typename F, int N > struct template_arity_impl { BOOST_STATIC_CONSTANT(int, value = - sizeof(arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1 + sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1 ); }; @@ -92,9 +90,7 @@ struct template_arity { BOOST_STATIC_CONSTANT(int, value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value - )); - typedef mpl::int_<value> type; }; diff --git a/3rdParty/Boost/src/boost/mpl/aux_/template_arity.hpp b/3rdParty/Boost/src/boost/mpl/aux_/template_arity.hpp index 47e4eeb..ed26ea2 100644 --- a/3rdParty/Boost/src/boost/mpl/aux_/template_arity.hpp +++ b/3rdParty/Boost/src/boost/mpl/aux_/template_arity.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: template_arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $ -// $Revision: 49267 $ +// $Id: template_arity.hpp 61584 2010-04-26 18:48:26Z agurtovoy $ +// $Date: 2010-04-26 14:48:26 -0400 (Mon, 26 Apr 2010) $ +// $Revision: 61584 $ #include <boost/mpl/aux_/config/ttp.hpp> #include <boost/mpl/aux_/config/lambda.hpp> @@ -98,7 +98,7 @@ template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct template_arity_impl { BOOST_STATIC_CONSTANT(int, value = - sizeof(arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1 + sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1 ); }; diff --git a/3rdParty/Boost/src/boost/mpl/aux_/unwrap.hpp b/3rdParty/Boost/src/boost/mpl/aux_/unwrap.hpp deleted file mode 100644 index dd710a7..0000000 --- a/3rdParty/Boost/src/boost/mpl/aux_/unwrap.hpp +++ /dev/null @@ -1,47 +0,0 @@ - -#ifndef BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED -#define BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED - -// Copyright Peter Dimov and Multi Media Ltd 2001, 2002 -// Copyright David Abrahams 2001 -// -// 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) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id: unwrap.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $ -// $Revision: 49267 $ - -#include <boost/ref.hpp> - -namespace boost { namespace mpl { namespace aux { - -template< typename F > -inline -F& unwrap(F& f, long) -{ - return f; -} - -template< typename F > -inline -F& -unwrap(reference_wrapper<F>& f, int) -{ - return f; -} - -template< typename F > -inline -F& -unwrap(reference_wrapper<F> const& f, int) -{ - return f; -} - -}}} - -#endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/for_each.hpp b/3rdParty/Boost/src/boost/mpl/for_each.hpp deleted file mode 100644 index 89abc85..0000000 --- a/3rdParty/Boost/src/boost/mpl/for_each.hpp +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef BOOST_MPL_FOR_EACH_HPP_INCLUDED -#define BOOST_MPL_FOR_EACH_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2008 -// -// 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) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id: for_each.hpp 55648 2009-08-18 05:16:53Z agurtovoy $ -// $Date: 2009-08-18 01:16:53 -0400 (Tue, 18 Aug 2009) $ -// $Revision: 55648 $ - -#include <boost/mpl/is_sequence.hpp> -#include <boost/mpl/begin_end.hpp> -#include <boost/mpl/apply.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/next_prior.hpp> -#include <boost/mpl/deref.hpp> -#include <boost/mpl/identity.hpp> -#include <boost/mpl/assert.hpp> -#include <boost/mpl/aux_/unwrap.hpp> - -#include <boost/type_traits/is_same.hpp> -#include <boost/utility/value_init.hpp> - -namespace boost { namespace mpl { - -namespace aux { - -template< bool done = true > -struct for_each_impl -{ - template< - typename Iterator - , typename LastIterator - , typename TransformFunc - , typename F - > - static void execute( - Iterator* - , LastIterator* - , TransformFunc* - , F - ) - { - } -}; - -template<> -struct for_each_impl<false> -{ - template< - typename Iterator - , typename LastIterator - , typename TransformFunc - , typename F - > - static void execute( - Iterator* - , LastIterator* - , TransformFunc* - , F f - ) - { - typedef typename deref<Iterator>::type item; - typedef typename apply1<TransformFunc,item>::type arg; - - // dwa 2002/9/10 -- make sure not to invoke undefined behavior - // when we pass arg. - value_initialized<arg> x; - aux::unwrap(f, 0)(boost::get(x)); - - typedef typename mpl::next<Iterator>::type iter; - for_each_impl<boost::is_same<iter,LastIterator>::value> - ::execute( static_cast<iter*>(0), static_cast<LastIterator*>(0), static_cast<TransformFunc*>(0), f); - } -}; - -} // namespace aux - -// agurt, 17/mar/02: pointer default parameters are necessary to workaround -// MSVC 6.5 function template signature's mangling bug -template< - typename Sequence - , typename TransformOp - , typename F - > -inline -void for_each(F f, Sequence* = 0, TransformOp* = 0) -{ - BOOST_MPL_ASSERT(( is_sequence<Sequence> )); - - typedef typename begin<Sequence>::type first; - typedef typename end<Sequence>::type last; - - aux::for_each_impl< boost::is_same<first,last>::value > - ::execute(static_cast<first*>(0), static_cast<last*>(0), static_cast<TransformOp*>(0), f); -} - -template< - typename Sequence - , typename F - > -inline -void for_each(F f, Sequence* = 0) -{ - for_each<Sequence, identity<> >(f); -} - -}} - -#endif // BOOST_MPL_FOR_EACH_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/is_sequence.hpp b/3rdParty/Boost/src/boost/mpl/is_sequence.hpp deleted file mode 100644 index 0c1f67b..0000000 --- a/3rdParty/Boost/src/boost/mpl/is_sequence.hpp +++ /dev/null @@ -1,112 +0,0 @@ - -#ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED -#define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2002-2004 -// -// 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) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id: is_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $ -// $Revision: 49267 $ - -#include <boost/mpl/not.hpp> -#include <boost/mpl/and.hpp> -#include <boost/mpl/begin_end.hpp> -#include <boost/mpl/if.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/sequence_tag_fwd.hpp> -#include <boost/mpl/identity.hpp> -#include <boost/mpl/void.hpp> -#include <boost/mpl/aux_/has_tag.hpp> -#include <boost/mpl/aux_/has_begin.hpp> -#include <boost/mpl/aux_/na_spec.hpp> -#include <boost/mpl/aux_/lambda_support.hpp> -#include <boost/mpl/aux_/config/eti.hpp> -#include <boost/mpl/aux_/config/msvc.hpp> -#include <boost/mpl/aux_/config/workaround.hpp> -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -# include <boost/mpl/aux_/msvc_is_class.hpp> -#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) -# include <boost/type_traits/is_class.hpp> -#endif - -#include <boost/type_traits/is_same.hpp> - -namespace boost { namespace mpl { - -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -namespace aux { - -// agurt, 11/jun/03: -// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a -// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector<int> >' -// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds -// the issue for most real-world cases -template< typename T > struct is_sequence_impl - : and_< - identity< aux::has_tag<T> > - , identity< aux::has_begin<T> > - > -{ -}; - -} // namespace aux - -template< - typename BOOST_MPL_AUX_NA_PARAM(T) - > -struct is_sequence - : if_< -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - aux::msvc_is_class<T> -#else - boost::is_class<T> -#endif - , aux::is_sequence_impl<T> - , bool_<false> - >::type -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) -}; - -#elif defined(BOOST_MPL_CFG_NO_HAS_XXX) - -template< - typename BOOST_MPL_AUX_NA_PARAM(T) - > -struct is_sequence - : bool_<false> -{ -}; - -#else - -template< - typename BOOST_MPL_AUX_NA_PARAM(T) - > -struct is_sequence - : not_< is_same< typename begin<T>::type, void_ > > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) -}; - -#endif // BOOST_MSVC - -#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) -template<> struct is_sequence<int> - : bool_<false> -{ -}; -#endif - -BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence) - -}} - -#endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED |