diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-11-24 20:33:19 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-11-24 20:35:17 (GMT) |
commit | 332d60c56dfaa11fdd135088279d15cd5983b3d4 (patch) | |
tree | dd77717a4e1732da929d5ff8a0471fa3f005e201 /3rdParty/Boost/src/boost/mpl | |
parent | 90c44a10fec26d2a0935b2d62e82b6a5be028373 (diff) | |
download | swift-contrib-332d60c56dfaa11fdd135088279d15cd5983b3d4.zip swift-contrib-332d60c56dfaa11fdd135088279d15cd5983b3d4.tar.bz2 |
Upgraded Boost to 1.45.0.
Diffstat (limited to '3rdParty/Boost/src/boost/mpl')
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/aux_/config/has_xxx.hpp | 7 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/aux_/contains_impl.hpp | 61 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/aux_/size_impl.hpp | 52 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/contains.hpp | 41 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/contains_fwd.hpp | 25 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/copy.hpp | 58 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/eval_if.hpp | 6 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/find.hpp | 38 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/has_xxx.hpp | 372 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/mpl/size.hpp | 42 |
10 files changed, 693 insertions, 9 deletions
diff --git a/3rdParty/Boost/src/boost/mpl/aux_/config/has_xxx.hpp b/3rdParty/Boost/src/boost/mpl/aux_/config/has_xxx.hpp index 8f2a46d..e03fe11 100644 --- a/3rdParty/Boost/src/boost/mpl/aux_/config/has_xxx.hpp +++ b/3rdParty/Boost/src/boost/mpl/aux_/config/has_xxx.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_xxx.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $ -// $Revision: 49267 $ +// $Id: has_xxx.hpp 63518 2010-07-02 08:32:03Z agurtovoy $ +// $Date: 2010-07-02 04:32:03 -0400 (Fri, 02 Jul 2010) $ +// $Revision: 63518 $ #include <boost/mpl/aux_/config/overload_resolution.hpp> #include <boost/mpl/aux_/config/workaround.hpp> @@ -27,6 +27,7 @@ ) # define BOOST_MPL_CFG_NO_HAS_XXX +# define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE #endif diff --git a/3rdParty/Boost/src/boost/mpl/aux_/contains_impl.hpp b/3rdParty/Boost/src/boost/mpl/aux_/contains_impl.hpp new file mode 100644 index 0000000..2ee4056 --- /dev/null +++ b/3rdParty/Boost/src/boost/mpl/aux_/contains_impl.hpp @@ -0,0 +1,61 @@ + +#ifndef BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED + +// Copyright Eric Friedman 2002 +// Copyright Aleksey Gurtovoy 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: contains_impl.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/contains_fwd.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> + +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { + +template< typename Tag > +struct contains_impl +{ + template< typename Sequence, typename T > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : not_< is_same< + typename find<Sequence,T>::type + , typename end<Sequence>::type + > > + { +#else + { + typedef not_< is_same< + typename find<Sequence,T>::type + , typename end<Sequence>::type + > > type; + + BOOST_STATIC_CONSTANT(bool, value = + (not_< is_same< + typename find<Sequence,T>::type + , typename end<Sequence>::type + > >::value) + ); +#endif + }; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,contains_impl) + +}} + +#endif // BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/aux_/size_impl.hpp b/3rdParty/Boost/src/boost/mpl/aux_/size_impl.hpp new file mode 100644 index 0000000..0e4885d --- /dev/null +++ b/3rdParty/Boost/src/boost/mpl/aux_/size_impl.hpp @@ -0,0 +1,52 @@ + +#ifndef BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-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: size_impl.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/size_fwd.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/distance.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +namespace boost { namespace mpl { + +// default implementation; conrete sequences might override it by +// specializing either the 'size_impl' or the primary 'size' template + +template< typename Tag > +struct size_impl +{ + template< typename Sequence > struct apply +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) + : distance< + typename begin<Sequence>::type + , typename end<Sequence>::type + > + { +#else + { + typedef typename distance< + typename begin<Sequence>::type + , typename end<Sequence>::type + >::type type; +#endif + }; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, size_impl) + +}} + +#endif // BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/contains.hpp b/3rdParty/Boost/src/boost/mpl/contains.hpp new file mode 100644 index 0000000..68e50bb --- /dev/null +++ b/3rdParty/Boost/src/boost/mpl/contains.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED +#define BOOST_MPL_CONTAINS_HPP_INCLUDED + +// Copyright Eric Friedman 2002 +// Copyright Aleksey Gurtovoy 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: contains.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/contains_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/contains_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct contains + : contains_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,T > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, contains) + +}} + +#endif // BOOST_MPL_CONTAINS_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/contains_fwd.hpp b/3rdParty/Boost/src/boost/mpl/contains_fwd.hpp new file mode 100644 index 0000000..57ae63f --- /dev/null +++ b/3rdParty/Boost/src/boost/mpl/contains_fwd.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED +#define BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED + +// Copyright Eric Friedman 2002 +// Copyright Aleksey Gurtovoy 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: contains_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ +// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $ +// $Revision: 49267 $ + +namespace boost { namespace mpl { + +template< typename Tag > struct contains_impl; +template< typename Sequence, typename T > struct contains; + +}} + +#endif // BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/copy.hpp b/3rdParty/Boost/src/boost/mpl/copy.hpp new file mode 100644 index 0000000..77376d0 --- /dev/null +++ b/3rdParty/Boost/src/boost/mpl/copy.hpp @@ -0,0 +1,58 @@ + +#ifndef BOOST_MPL_COPY_HPP_INCLUDED +#define BOOST_MPL_COPY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003-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: copy.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/fold.hpp> +#include <boost/mpl/reverse_fold.hpp> +#include <boost/mpl/aux_/inserter_algorithm.hpp> + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename Sequence + , typename Inserter + > +struct copy_impl + : fold< + Sequence + , typename Inserter::state + , typename Inserter::operation + > +{ +}; + +template< + typename Sequence + , typename Inserter + > +struct reverse_copy_impl + : reverse_fold< + Sequence + , typename Inserter::state + , typename Inserter::operation + > +{ +}; + +} // namespace aux + +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(2, copy) + +}} + +#endif // BOOST_MPL_COPY_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/eval_if.hpp b/3rdParty/Boost/src/boost/mpl/eval_if.hpp index 3d94caf..d483c72 100644 --- a/3rdParty/Boost/src/boost/mpl/eval_if.hpp +++ b/3rdParty/Boost/src/boost/mpl/eval_if.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: eval_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $ -// $Revision: 49267 $ +// $Id: eval_if.hpp 61921 2010-05-11 21:33:24Z neilgroves $ +// $Date: 2010-05-11 17:33:24 -0400 (Tue, 11 May 2010) $ +// $Revision: 61921 $ #include <boost/mpl/if.hpp> #include <boost/mpl/aux_/na_spec.hpp> diff --git a/3rdParty/Boost/src/boost/mpl/find.hpp b/3rdParty/Boost/src/boost/mpl/find.hpp new file mode 100644 index 0000000..6d71a88 --- /dev/null +++ b/3rdParty/Boost/src/boost/mpl/find.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_FIND_HPP_INCLUDED +#define BOOST_MPL_FIND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2002 +// +// 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: find.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/find_if.hpp> +#include <boost/mpl/same_as.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct find + : find_if< Sequence,same_as<T> > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, find) + +}} + +#endif // BOOST_MPL_FIND_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/has_xxx.hpp b/3rdParty/Boost/src/boost/mpl/has_xxx.hpp index 39ed909..9258759 100644 --- a/3rdParty/Boost/src/boost/mpl/has_xxx.hpp +++ b/3rdParty/Boost/src/boost/mpl/has_xxx.hpp @@ -4,6 +4,7 @@ // Copyright Aleksey Gurtovoy 2002-2006 // Copyright David Abrahams 2002-2003 +// Copyright Daniel Walker 2007 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -11,20 +12,26 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_xxx.hpp 49273 2008-10-11 06:54:06Z agurtovoy $ -// $Date: 2008-10-11 02:54:06 -0400 (Sat, 11 Oct 2008) $ -// $Revision: 49273 $ +// $Id: has_xxx.hpp 64146 2010-07-19 00:46:31Z djwalker $ +// $Date: 2010-07-18 20:46:31 -0400 (Sun, 18 Jul 2010) $ +// $Revision: 64146 $ #include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/na_spec.hpp> #include <boost/mpl/aux_/type_wrapper.hpp> #include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/config/gcc.hpp> #include <boost/mpl/aux_/config/has_xxx.hpp> #include <boost/mpl/aux_/config/msvc_typename.hpp> #include <boost/mpl/aux_/config/msvc.hpp> #include <boost/mpl/aux_/config/static_constant.hpp> #include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/preprocessor/array/elem.hpp> #include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/control/if.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_trailing_params.hpp> #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) # include <boost/type_traits/is_class.hpp> @@ -271,4 +278,363 @@ struct trait \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \ /**/ + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) + +// Create a boolean Metafunction to detect a nested template +// member. This implementation is based on a USENET newsgroup's +// posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19), +// Rani Sharoni's USENET posting cited above, the non-template has_xxx +// implementations above, and discussion on the Boost mailing list. + +# if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1 +# endif +# endif + +# if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION) +# if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)) +# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1 +# endif +# endif + +# if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1 +# endif +# endif + +// NOTE: Many internal implementation macros take a Boost.Preprocessor +// array argument called args which is of the following form. +// ( 4, ( trait, name, max_arity, default_ ) ) + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ + BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _introspect) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _substitute), n) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \ + BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _test) \ + /**/ + +// Thanks to Guillaume Melquiond for pointing out the need for the +// "substitute" template as an argument to the overloaded test +// functions to get SFINAE to work for member templates with the +// correct name but different number of arguments. +# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \ + template< \ + template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename V) > class V \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) { \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE \ + , args \ + ) \ + /**/ + +# if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION +# define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + template< typename V > \ + static boost::mpl::aux::no_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + static boost::mpl::aux::no_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ + /**/ +# endif + +# if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES +# define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \ + template< typename V > \ + static boost::mpl::aux::yes_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + boost::mpl::aux::type_wrapper< V > const volatile* \ + , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \ + V::template BOOST_PP_ARRAY_ELEM(1, args) \ + >* = 0 \ + ); \ + /**/ +# define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT \ + , args \ + ) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + template< typename V > \ + static boost::mpl::aux::yes_tag \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + V const volatile* \ + , member_macro(args, V, T)* = 0 \ + ); \ + /**/ +# endif + +# if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof(BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U >(0)) \ + == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# else +# if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + static_cast< boost::mpl::aux::type_wrapper< U >* >(0) \ + ) \ + ) == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_TEST(args) \ + sizeof( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ + static_cast< U* >(0) \ + ) \ + ) == sizeof(boost::mpl::aux::yes_tag) \ + /**/ +# endif +# endif + +# define BOOST_MPL_HAS_MEMBER_INTROSPECT( \ + args, substitute_macro, member_macro \ + ) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) { \ + BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ + BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ + BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ + BOOST_STATIC_CONSTANT( \ + bool, value = BOOST_MPL_HAS_MEMBER_TEST(args) \ + ); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args, introspect_macro, substitute_macro, member_macro \ + ) \ + template< \ + typename T \ + , typename fallback_ \ + = boost::mpl::bool_< BOOST_PP_ARRAY_ELEM(3, args) > \ + > \ + class BOOST_PP_ARRAY_ELEM(0, args) { \ + introspect_macro(args, substitute_macro, member_macro) \ + public: \ + static const bool value \ + = BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< T >::value; \ + typedef typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< \ + T \ + >::type type; \ + }; \ + /**/ + +// BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE expands to the full +// implementation of the function-based metafunction. Compile with -E +// to see the preprocessor output for this macro. +# define BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args \ + , BOOST_MPL_HAS_MEMBER_INTROSPECT \ + , substitute_macro \ + , member_macro \ + ) \ + /**/ + +# if BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE + +# if !defined(BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE) +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE 1 +# endif +# endif + +# if !BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + /**/ +# else +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) \ + BOOST_PP_CAT( \ + boost_mpl_has_xxx_ \ + , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ + ) \ + /**/ +# endif + +# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME( \ + args \ + ) \ + BOOST_PP_CAT( \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, 0 \ + ) \ + , _tag \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + z, n, args \ + ) \ + template< \ + template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename U) > class U \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + ) { \ + typedef \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ + type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro \ + ) \ + typedef void \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args); \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE \ + , args \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE( \ + args, member_macro \ + ) \ + template< \ + typename U \ + , typename V \ + = BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ + > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) { \ + BOOST_STATIC_CONSTANT(bool, value = false); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE( \ + z, n, args \ + ) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< \ + U \ + , typename \ + BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ + args, n \ + )< \ + BOOST_MSVC_TYPENAME U::BOOST_PP_ARRAY_ELEM(1, args)< > \ + >::type \ + > { \ + BOOST_STATIC_CONSTANT(bool, value = true); \ + typedef boost::mpl::bool_< value > type; \ + }; \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE( \ + args, member_macro \ + ) \ + BOOST_PP_REPEAT( \ + BOOST_PP_ARRAY_ELEM(2, args) \ + , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE \ + , args \ + ) \ + /**/ + +# define BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE(args, member_macro) \ + BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE(args, member_macro) \ + template< typename U > \ + struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ + : BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U > { \ + }; \ + /**/ + +// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE expands to the full +// implementation of the template-based metafunction. Compile with -E +// to see the preprocessor output for this macro. +// +// Note that if BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE is +// defined BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE needs +// to be expanded at namespace level before +// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE can be used. +# define BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro, member_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ + args, substitute_macro \ + ) \ + BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ + args \ + , BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE \ + , substitute_macro \ + , member_macro \ + ) \ + /**/ + +# endif // BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE + +// Note: In the current implementation the parameter and access macros +// are no longer expanded. +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400) +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ + ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ + ) \ + /**/ +# else +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ + ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ + , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ + ) \ + /**/ +# endif + +#else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +// placeholder implementation + +# define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ + template< typename T \ + , typename fallback_ = boost::mpl::bool_< default_ > > \ + struct trait { \ + BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ + typedef fallback_ type; \ + }; \ + /**/ + +#endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE + +# define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name) \ + BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( \ + BOOST_PP_CAT(has_, name), name, false \ + ) \ + /**/ + #endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/mpl/size.hpp b/3rdParty/Boost/src/boost/mpl/size.hpp new file mode 100644 index 0000000..6ff2e65 --- /dev/null +++ b/3rdParty/Boost/src/boost/mpl/size.hpp @@ -0,0 +1,42 @@ + +#ifndef BOOST_MPL_SIZE_HPP_INCLUDED +#define BOOST_MPL_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-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: size.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/size_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/size_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/msvc_eti_base.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct size + : aux::msvc_eti_base< + typename size_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence >::type + >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, size, (Sequence)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, size) + +}} + +#endif // BOOST_MPL_SIZE_HPP_INCLUDED |