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/spirit/home/phoenix/core | |
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/spirit/home/phoenix/core')
17 files changed, 0 insertions, 1472 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp deleted file mode 100644 index 6ff48e9..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp +++ /dev/null @@ -1,194 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_ACTOR_HPP -#define PHOENIX_CORE_ACTOR_HPP - -#include <boost/spirit/home/phoenix/core/limits.hpp> - -#if !defined(BOOST_RESULT_OF_NUM_ARGS) -# define BOOST_RESULT_OF_NUM_ARGS PHOENIX_ACTOR_LIMIT -#elif (BOOST_RESULT_OF_NUM_ARGS < PHOENIX_ACTOR_LIMIT) -# error "BOOST_RESULT_OF_NUM_ARGS < PHOENIX_ACTOR_LIMIT" -#endif - -#include <boost/spirit/home/phoenix/core/basic_environment.hpp> -#include <boost/mpl/min.hpp> -#include <boost/mpl/identity.hpp> -#include <boost/type_traits/add_const.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/utility/result_of.hpp> - -namespace boost { namespace phoenix -{ - // phoenix::void_ is the same as fusion::void_ - typedef fusion::void_ void_; - - namespace detail - { - // Forward declarations. These will come in when we get to the - // operator module, yet, the actor's assignment operator and index - // operator are required to be members. - - template <typename T0, typename T1> - struct make_assign_composite; - - template <typename T0, typename T1> - struct make_index_composite; - - template <typename BaseT0, typename BaseT1> - struct comma_result; - - // error no arguments supplied - struct error_expecting_arguments - { - template <typename T> - error_expecting_arguments(T const&) {} - }; - } - - template <typename Eval, typename Env> - struct eval_result - { - typedef typename Eval::template result<Env>::type type; - }; - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable: 4522) // multiple assignment operators specified warning -#endif - - template <typename Eval> - struct actor : Eval - { - typedef actor<Eval> self_type; - typedef Eval eval_type; - - template <class Sig> struct result {}; - - actor() - : Eval() {} - - actor(Eval const& base) - : Eval(base) {} - - template <typename T0> - explicit actor(T0 const& _0) - : Eval(_0) {} - - template <typename T0, typename T1> - actor(T0 const& _0, T1 const& _1) - : Eval(_0, _1) {} - - typedef typename - mpl::eval_if< - typename Eval::no_nullary // avoid calling eval_result when this is true - , mpl::identity<detail::error_expecting_arguments> - , eval_result<eval_type, basic_environment<> > - >::type - nullary_result; - - actor& operator=(actor const& rhs) - { - Eval::operator=(rhs); - return *this; - } - - actor& operator=(actor& rhs) - { - Eval::operator=(rhs); - return *this; - } - - nullary_result - operator()() const - { - return eval_type::eval(basic_environment<>()); - } - - template <class F, class A0> - struct result<F(A0)> - : eval_result< - eval_type - , basic_environment< - typename remove_reference<A0>::type - > - > - {}; - - template <typename T0> - typename result<actor(T0&)>::type - operator()(T0& _0) const - { - return eval_type::eval(basic_environment<T0>(_0)); - } - - template <class F, class A0, class A1> - struct result<F(A0,A1)> - : eval_result< - eval_type - , basic_environment< - typename remove_reference<A0>::type - , typename remove_reference<A1>::type - > - > - {}; - - template <typename T0, typename T1> - typename result<actor(T0&,T1&)>::type - operator()(T0& _0, T1& _1) const - { - return eval_type::eval(basic_environment<T0, T1>(_0, _1)); - } - - template <typename T1> - typename detail::make_assign_composite<self_type, T1>::type - operator=(T1 const& a1) const; - - template <typename T1> - typename detail::make_index_composite<self_type, T1>::type - operator[](T1 const& a1) const; - - // Bring in the rest of the constructors and function call operators - #include <boost/spirit/home/phoenix/core/detail/actor.hpp> - }; - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - - // Forward declaration: The intent to overload the comma must be - // stated early on to avoid the subtle problem that arises when - // the header file where the comma operator overload is defined, - // is not included by the client and the client attempts to use - // the comma anyway. - - namespace detail - { - template <typename BaseT0, typename BaseT1> - struct comma_result; - } - - template <typename BaseT0, typename BaseT1> - typename detail::comma_result<BaseT0, BaseT1>::type - operator,(actor<BaseT0> const& a0, actor<BaseT1> const& a1); -}} - -namespace boost -{ - template <typename Eval> - struct result_of<phoenix::actor<Eval>()> - { - typedef typename phoenix::actor<Eval>::nullary_result type; - }; - - template <typename Eval> - struct result_of<phoenix::actor<Eval> const()> - : result_of<phoenix::actor<Eval>()> - {}; -} - -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp deleted file mode 100644 index 1679cb2..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp +++ /dev/null @@ -1,99 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_ARGUMENT_HPP -#define PHOENIX_CORE_ARGUMENT_HPP - -#include <boost/preprocessor/repetition/repeat_from_to.hpp> -#include <boost/preprocessor/inc.hpp> -#include <boost/spirit/home/phoenix/core/actor.hpp> -#include <boost/fusion/include/at.hpp> -#include <boost/mpl/if.hpp> -#include <boost/mpl/eval_if.hpp> -#include <boost/mpl/identity.hpp> -#include <boost/mpl/less.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/int.hpp> -#include <boost/mpl/at.hpp> -#include <boost/mpl/size.hpp> -#include <boost/type_traits/add_reference.hpp> - -#define PHOENIX_DECLARE_ARG(z, n, data) \ - typedef actor<argument<n> > \ - BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(n)), _type); \ - actor<argument<n> > const \ - BOOST_PP_CAT(arg, BOOST_PP_INC(n)) = argument<n>(); \ - typedef actor<argument<n> > \ - BOOST_PP_CAT(BOOST_PP_CAT(_, BOOST_PP_INC(n)), _type); \ - actor<argument<n> > const \ - BOOST_PP_CAT(_, BOOST_PP_INC(n)) = argument<n>(); - -namespace boost { namespace phoenix -{ - namespace detail - { - template <typename Arg> - struct error_argument_not_found {}; - inline void test_invalid_argument(int) {} - } - - template <int N> - struct argument - { - typedef mpl::true_ no_nullary; - - template <typename Env> - struct result - { - typedef typename - fusion::result_of::at<typename Env::tie_type, mpl::int_<N> >::type - type; - }; - - template <typename Env> - typename result<Env>::type - eval(Env const& env) const - { - typedef typename - mpl::if_< - mpl::less<mpl::int_<N>, mpl::size<typename Env::args_type> > - , int - , detail::error_argument_not_found<argument<N> > - >::type - check_out_of_bounds; - - detail::test_invalid_argument(check_out_of_bounds()); - return fusion::at_c<N>(env.args()); - } - }; - - namespace arg_names - { - // Phoenix style names - typedef actor<argument<0> > arg1_type; - actor<argument<0> > const arg1 = argument<0>(); - typedef actor<argument<1> > arg2_type; - actor<argument<1> > const arg2 = argument<1>(); - typedef actor<argument<2> > arg3_type; - actor<argument<2> > const arg3 = argument<2>(); - - // BLL style names - typedef actor<argument<0> > _1_type; - actor<argument<0> > const _1 = argument<0>(); - typedef actor<argument<1> > _2_type; - actor<argument<1> > const _2 = argument<1>(); - typedef actor<argument<2> > _3_type; - actor<argument<2> > const _3 = argument<2>(); - - // Bring in the rest or the Phoenix style arguments (arg4 .. argN+1) - // and BLL style arguments (_4 .. _N+1), using PP - BOOST_PP_REPEAT_FROM_TO( - 3, PHOENIX_ARG_LIMIT, PHOENIX_DECLARE_ARG, _) - } -}} - -#undef PHOENIX_DECLARE_ARG -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp deleted file mode 100644 index 36f0aac..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_AS_ACTOR_HPP -#define PHOENIX_CORE_AS_ACTOR_HPP - -#include <boost/spirit/home/phoenix/core/actor.hpp> - -namespace boost { namespace phoenix -{ - template <typename T> - struct as_actor_base; // defined in value.hpp - - template <typename Base> - struct as_actor_base<actor<Base> > - { - typedef Base type; - - static Base const& - convert(actor<Base> const& x) - { - return x; - } - }; - - template <> - struct as_actor_base<fusion::void_> - { - typedef fusion::void_ type; - struct error_attempting_to_convert_void_type_to_an_actor {}; - - static void - convert(error_attempting_to_convert_void_type_to_an_actor); - }; - - template <> - struct as_actor_base<void> - { - typedef void type; - struct error_attempting_to_convert_void_type_to_an_actor {}; - - static void - convert(error_attempting_to_convert_void_type_to_an_actor); - }; - - template <typename T> - struct as_actor - { - typedef actor<typename as_actor_base<T>::type> type; - - static type - convert(T const& x) - { - return as_actor_base<T>::convert(x); - } - }; -}} - -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp deleted file mode 100644 index 5ef8223..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp +++ /dev/null @@ -1,81 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_BASIC_ENVIRONMENT_HPP -#define PHOENIX_CORE_BASIC_ENVIRONMENT_HPP - -#include <boost/spirit/home/phoenix/core/limits.hpp> -#include <boost/mpl/remove.hpp> -#include <boost/mpl/transform.hpp> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/type_traits/add_reference.hpp> -#include <boost/fusion/include/as_vector.hpp> -#include <boost/fusion/include/mpl.hpp> - -namespace boost { namespace phoenix -{ - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - PHOENIX_ARG_LIMIT, typename T, fusion::void_)> - class basic_environment - { - typedef - mpl::BOOST_PP_CAT(vector, PHOENIX_ARG_LIMIT)< - BOOST_PP_ENUM_PARAMS(PHOENIX_ARG_LIMIT, T)> - args_with_void_type; - - public: - - // args_type: the list of types in an mpl::sequence - typedef typename - mpl::remove<args_with_void_type, fusion::void_>::type - args_type; - - // tie_type: a fusion::tuple of references - typedef typename - fusion::result_of::as_vector< - typename mpl::transform< - args_type, boost::add_reference<mpl::_1> - >::type - >::type - tie_type; - - basic_environment() - : args_() {} - - template <typename U0> - explicit basic_environment(U0& _0) - : args_(_0) {} - - template <typename U0, typename U1> - basic_environment(U0& _0, U1& _1) - : args_(_0, _1) {} - - // Bring in the rest of the constructors - #include <boost/spirit/home/phoenix/core/detail/basic_environment.hpp> - - tie_type const& - args() const - { - return args_; - } - - tie_type& - args() - { - return args_; - } - - private: - - tie_type args_; - }; -}} - -#endif - diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp deleted file mode 100644 index d536113..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp +++ /dev/null @@ -1,118 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_COMPOSE_HPP -#define PHOENIX_CORE_COMPOSE_HPP - -#include <boost/mpl/eval_if.hpp> -#include <boost/mpl/identity.hpp> -#include <boost/type_traits/is_same.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/spirit/home/phoenix/core/composite.hpp> -#include <boost/spirit/home/phoenix/core/value.hpp> -#include <boost/spirit/home/phoenix/core/as_actor.hpp> - -#define PHOENIX_AS_ACTOR(z, n, data) \ - typename mpl::eval_if< \ - is_same<BOOST_PP_CAT(T, n), fusion::void_> \ - , mpl::identity<fusion::void_> \ - , as_actor_base<BOOST_PP_CAT(T, n)> \ - >::type - -namespace boost { namespace phoenix -{ - -/////////////////////////////////////////////////////////////////////////////// -// -// as_composite<EvalPolicy, T0,... TN> metafunction -// -// Create a composite given an EvalPolicy and types T0..TN. -// The types are converted to an actor through the as_actor -// metafunction (see as_actor.hpp). -// -/////////////////////////////////////////////////////////////////////////////// - template < - typename EvalPolicy - , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - PHOENIX_COMPOSITE_LIMIT, typename T, fusion::void_)> - struct as_composite - { - typedef composite< - EvalPolicy - , fusion::vector< - BOOST_PP_ENUM(PHOENIX_COMPOSITE_LIMIT, PHOENIX_AS_ACTOR, _)> - > - type; - }; - -/////////////////////////////////////////////////////////////////////////////// -// -// compose functions -// -// Usage: -// -// compose<EvalPolicy>(_0, _1,... _N) -// -// Returns a composite given an EvalPolicy and arguments _0.._N. -// The arguments are converted to an actor through the as_actor -// metafunction (see as_actor.hpp). -// -/////////////////////////////////////////////////////////////////////////////// - template <typename EvalPolicy> - inline actor<typename as_composite<EvalPolicy>::type> - compose() - { - return actor<typename as_composite<EvalPolicy>::type>(); - } - - template <typename EvalPolicy, typename T0> - inline actor<typename as_composite<EvalPolicy, T0>::type> - compose(T0 const& _0) - { - return actor<typename as_composite<EvalPolicy, T0>::type>( - as_actor<T0>::convert(_0) - ); - } - - template <typename EvalPolicy, typename T0, typename T1> - inline actor<typename as_composite<EvalPolicy, T0, T1>::type> - compose(T0 const& _0, T1 const& _1) - { - return actor<typename as_composite<EvalPolicy, T0, T1>::type>( - as_actor<T0>::convert(_0) - , as_actor<T1>::convert(_1) - ); - } - - // Bring in the the rest of the compose overloads - #include <boost/spirit/home/phoenix/core/detail/compose.hpp> - -/////////////////////////////////////////////////////////////////////////////// -// -// re_curry<EvalPolicy, T0,...TN> -// -// returns the result of re currying T0..TN using EvalPolicy. -// -/////////////////////////////////////////////////////////////////////////////// - template < - typename EvalPolicy - , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - PHOENIX_COMPOSITE_LIMIT, typename T, fusion::void_)> - struct re_curry - { - typedef actor< - typename as_composite< - EvalPolicy - , BOOST_PP_ENUM_PARAMS(PHOENIX_COMPOSITE_LIMIT, T)>::type - > - type; - }; -}} - -#undef PHOENIX_AS_ACTOR -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp deleted file mode 100644 index 283bdc2..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_COMPOSITE_HPP -#define PHOENIX_CORE_COMPOSITE_HPP - -#include <boost/spirit/home/phoenix/core/actor.hpp> -#include <boost/spirit/home/phoenix/core/is_actor.hpp> -#include <boost/fusion/include/vector.hpp> -#include <boost/fusion/include/at.hpp> -#include <boost/fusion/include/size.hpp> -#include <boost/fusion/include/mpl.hpp> -#include <boost/mpl/fold.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/or.hpp> - -namespace boost { namespace phoenix -{ - namespace detail - { - template <int N> - struct composite_eval; - - struct compute_no_nullary - { - template <typename State, typename T> - struct apply - { - typedef typename - mpl::or_<typename T::no_nullary, State>::type - type; - }; - }; - } - - template <typename EvalPolicy, typename EvalTuple> - struct composite : EvalTuple - { - typedef EvalTuple base_type; - typedef composite<EvalPolicy, EvalTuple> self_type; - typedef EvalPolicy eval_policy_type; - - typedef typename - mpl::fold< - EvalTuple - , mpl::false_ - , detail::compute_no_nullary - >::type - no_nullary; - - template <typename Env> - struct result - { - typedef - typename detail::composite_eval< - fusion::result_of::size<base_type>::value>:: - template result<self_type, Env>::type - type; - }; - - composite() - : base_type() {} - - composite(base_type const& base) - : base_type(base) {} - - template <typename U0> - composite(U0& _0) - : base_type(_0) {} - - template <typename U0, typename U1> - composite(U0& _0, U1& _1) - : base_type(_0, _1) {} - - template <typename Env> - typename result<Env>::type - eval(Env const& env) const - { - typedef typename result<Env>::type return_type; - return detail:: - composite_eval<fusion::result_of::size<base_type>::value>::template - call<return_type>(*this, env); - } - - // Bring in the rest of the constructors - #include <boost/spirit/home/phoenix/core/detail/composite.hpp> - }; - - // Bring in the detail::composite_eval<0..N> definitions - #include <boost/spirit/home/phoenix/core/detail/composite_eval.hpp> -}} - -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp deleted file mode 100644 index 66666c5..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#ifndef PHOENIX_CORE_DETAIL_ACTOR_HPP -#define PHOENIX_CORE_DETAIL_ACTOR_HPP - -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/facilities/intercept.hpp> - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_ACTOR_LIMIT, \ - "boost/spirit/home/phoenix/core/detail/actor.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - actor(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) - : Eval(BOOST_PP_ENUM_PARAMS(N, _)) {} - - template <typename F, BOOST_PP_ENUM_PARAMS(N, typename A)> - struct result<F(BOOST_PP_ENUM_PARAMS(N, A))> - : eval_result< - eval_type - , basic_environment< - BOOST_PP_ENUM_BINARY_PARAMS( - N - , typename remove_reference<A - , >::type BOOST_PP_INTERCEPT - ) - > - > - {}; - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - typename result< - actor(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & BOOST_PP_INTERCEPT)) - >::type - operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) const - { - return eval_type::eval( - basic_environment<BOOST_PP_ENUM_PARAMS(N, T)>( - BOOST_PP_ENUM_PARAMS(N, _)) - ); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp deleted file mode 100644 index 986ecf2..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#ifndef PHOENIX_CORE_DETAIL_BASIC_ENVIRONMENT_HPP -#define PHOENIX_CORE_DETAIL_BASIC_ENVIRONMENT_HPP - -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_ARG_LIMIT, \ - "boost/spirit/home/phoenix/core/detail/basic_environment.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template <BOOST_PP_ENUM_PARAMS(N, typename U)> - basic_environment(BOOST_PP_ENUM_BINARY_PARAMS(N, U, & _)) - : args_(BOOST_PP_ENUM_PARAMS(N, _)) {} - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp deleted file mode 100644 index 945a3d3..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#ifndef PHOENIX_CORE_DETAIL_COMPOSE_DETAIL_HPP -#define PHOENIX_CORE_DETAIL_COMPOSE_DETAIL_HPP - -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum.hpp> - -#define PHOENIX_AS_ACTOR_CONVERT(z, n, data) \ - as_actor<BOOST_PP_CAT(T, n)>::convert(BOOST_PP_CAT(_, n)) - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/core/detail/compose.hpp")) -#include BOOST_PP_ITERATE() - -#undef PHOENIX_AS_ACTOR_CONVERT -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template <typename EvalPolicy, BOOST_PP_ENUM_PARAMS(N, typename T)> - inline actor< - typename as_composite<EvalPolicy, BOOST_PP_ENUM_PARAMS(N, T)>::type> - compose(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) - { - return actor< - typename as_composite<EvalPolicy, BOOST_PP_ENUM_PARAMS(N, T)>::type>( - BOOST_PP_ENUM(N, PHOENIX_AS_ACTOR_CONVERT, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp deleted file mode 100644 index 6970f7c..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#ifndef PHOENIX_CORE_DETAIL_COMPOSITE_HPP -#define PHOENIX_CORE_DETAIL_COMPOSITE_HPP - -#include <boost/preprocessor/iterate.hpp> - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/core/detail/composite.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template <BOOST_PP_ENUM_PARAMS(N, typename U)> - composite(BOOST_PP_ENUM_BINARY_PARAMS(N, U, & _)) - : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp deleted file mode 100644 index 14f12af..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#ifndef PHOENIX_CORE_DETAIL_COMPOSITE_EVAL_HPP -#define PHOENIX_CORE_DETAIL_COMPOSITE_EVAL_HPP - -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> - - namespace detail - { - template <int N> - struct composite_eval; - - template <> - struct composite_eval<0> - { - template <typename Composite, typename Env> - struct result - { - typedef typename Composite::eval_policy_type:: - template result<Env>::type - type; - }; - - template <typename RT, typename Composite, typename Env> - static RT - call(Composite const& /*composite*/, Env const& env) - { - typedef typename Composite::eval_policy_type eval_policy_type; - return eval_policy_type::template eval<RT>(env); - } - }; - - template <typename Actor, typename Env> - struct eval_is_actor - : is_actor<typename Actor::template result<Env>::type> {}; - - template <typename Actor, typename Env> - struct eval_is_void - : is_same<typename Actor::template result<Env>::type, fusion::void_> {}; - } - -#define PHOENIX_GET_ACTOR_TYPE(z, n, data) \ - typedef \ - typename fusion::result_of::value_at_c<Composite, n>::type \ - BOOST_PP_CAT(actor, n); - -#define PHOENIX_GET_ACTOR(z, n, data) \ - fusion::at_c<n>(composite) - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/core/detail/composite_eval.hpp")) -#include BOOST_PP_ITERATE() - -#undef PHOENIX_GET_ACTOR -#undef PHOENIX_GET_ACTOR_TYPE -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - namespace detail - { - template <> - struct composite_eval<N> - { - template <typename Composite, typename Env> - struct result - { - BOOST_PP_REPEAT(N, PHOENIX_GET_ACTOR_TYPE, _) - - typedef typename - Composite::eval_policy_type::template result< - Env, BOOST_PP_ENUM_PARAMS(N, actor) - >::type - type; - }; - - template <typename RT, typename Composite, typename Env> - static RT - call(Composite const& composite, Env const& env) - { - typedef typename Composite::eval_policy_type eval_policy_type; - return eval_policy_type::template eval<RT>( - env, BOOST_PP_ENUM(N, PHOENIX_GET_ACTOR, _)); - } - }; - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp deleted file mode 100644 index 711b32c..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp +++ /dev/null @@ -1,142 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(BOOST_PP_IS_ITERATING) -#if !defined(PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP) -#define PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP - -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/enum.hpp> -#include <boost/preprocessor/repeat.hpp> -#include <boost/preprocessor/dec.hpp> -#include <boost/mpl/eval_if.hpp> -#include <boost/mpl/find.hpp> -#include <boost/mpl/identity.hpp> -#include <boost/type_traits/is_same.hpp> -#include <boost/type_traits/remove_reference.hpp> - -// we assume that mpl::vectorN, where N = PHOENIX_COMPOSITE_LIMIT -// is included already. - -namespace boost { namespace phoenix { namespace detail -{ - template <int N> - struct function_eval; - - template <> - struct function_eval<0> - { - template <typename Env, typename F> - struct result - { - typedef typename - remove_reference< - typename F::template result<Env>::type - >::type - fn; - typedef typename fn::result_type type; - }; - - template <typename RT, typename Env, typename F> - static RT - eval(Env const& env, F const& f) - { - return f.eval(env)(); - } - }; - - template <typename T> - T& help_rvalue_deduction(T& x) - { - return x; - } - - template <typename T> - T const& help_rvalue_deduction(T const& x) - { - return x; - } - -// When we call f(_0, _1...) we remove the reference when deducing f's -// return type. $$$ Explain why $$$ - -#define PHOENIX_GET_ARG(z, n, data) \ - typedef typename \ - remove_reference< \ - typename BOOST_PP_CAT(A, n)::template result<Env>::type \ - >::type \ - BOOST_PP_CAT(a, n); - -#define PHOENIX_EVAL_ARG(z, n, data) \ - help_rvalue_deduction(BOOST_PP_CAT(_, n).eval(env)) - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ - "boost/spirit/home/phoenix/core/detail/function_eval.hpp")) -#include BOOST_PP_ITERATE() - -}}} // namespace boost::phoenix::detail - -#undef PHOENIX_GET_ARG -#undef PHOENIX_EVAL_ARG -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template <> - struct function_eval<N> - { - template <typename Env, typename F - , BOOST_PP_ENUM_PARAMS(N, typename A)> - struct result - { - typedef typename - remove_reference< - typename F::template result<Env>::type - >::type - fn; - BOOST_PP_REPEAT(N, PHOENIX_GET_ARG, _) - - typedef BOOST_PP_CAT(mpl::vector, N) - <BOOST_PP_ENUM_PARAMS(N, a)> - args; - - typedef typename - fn::template result<BOOST_PP_ENUM_PARAMS(N, a)> - function_apply; - - typedef typename - mpl::eval_if< - is_same< - typename mpl::find<args, fusion::void_>::type - , typename mpl::end<args>::type> - , function_apply - , mpl::identity<fusion::void_> - >::type - type; - }; - - template <typename RT, typename Env, typename F - , BOOST_PP_ENUM_PARAMS(N, typename A)> - static RT - eval(Env const& env, F const& f - , BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) - { - return f.eval(env)(BOOST_PP_ENUM(N, PHOENIX_EVAL_ARG, _)); - } - }; - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp deleted file mode 100644 index ba0e77c..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_IS_ACTOR_HPP -#define PHOENIX_CORE_IS_ACTOR_HPP - -#include <boost/spirit/home/phoenix/core/actor.hpp> -#include <boost/mpl/bool.hpp> - -namespace boost { namespace phoenix -{ -/////////////////////////////////////////////////////////////////////////////// -// -// is_actor<T> -// -// Tests if T is an actor. Evaluates to mpl::true_ or mpl::false_ -// -/////////////////////////////////////////////////////////////////////////////// - template <typename T> - struct is_actor : mpl::false_ {}; - - template <typename Base> - struct is_actor<actor<Base> > : mpl::true_ {}; -}} - -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp deleted file mode 100644 index 50c7573..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_LIMITS_HPP -#define PHOENIX_CORE_LIMITS_HPP - -#include <boost/preprocessor/dec.hpp> - -#if !defined(PHOENIX_LIMIT) -# define PHOENIX_LIMIT 10 -#elif (PHOENIX_LIMIT < 5) -# error "PHOENIX_LIMIT is set too low" -#endif - -#if !defined(PHOENIX_ARG_LIMIT) -# define PHOENIX_ARG_LIMIT PHOENIX_LIMIT -#elif (PHOENIX_ARG_LIMIT < 5) -# error "PHOENIX_ARG_LIMIT is set too low" -#endif - -#if !defined(PHOENIX_ACTOR_LIMIT) -# define PHOENIX_ACTOR_LIMIT PHOENIX_LIMIT -#elif (PHOENIX_ACTOR_LIMIT > PHOENIX_ARG_LIMIT) -# error "PHOENIX_ACTOR_LIMIT > PHOENIX_ARG_LIMIT" -#elif (PHOENIX_ACTOR_LIMIT < 3) -# error "PHOENIX_ACTOR_LIMIT is set too low" -#endif - -#if !defined(PHOENIX_COMPOSITE_LIMIT) -# define PHOENIX_COMPOSITE_LIMIT PHOENIX_LIMIT -#elif (PHOENIX_COMPOSITE_LIMIT < 5) -# error "PHOENIX_COMPOSITE_LIMIT is set too low" -#endif - -#if !defined(PHOENIX_MEMBER_LIMIT) -# define PHOENIX_MEMBER_LIMIT BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT)) -#elif (PHOENIX_MEMBER_LIMIT > PHOENIX_COMPOSITE_LIMIT) -# error "PHOENIX_MEMBER_LIMIT > PHOENIX_COMPOSITE_LIMIT" -#elif (PHOENIX_MEMBER_LIMIT < 3) -# error "PHOENIX_MEMBER_LIMIT is set too low" -#endif - -#if !defined(PHOENIX_CATCH_LIMIT) -# define PHOENIX_CATCH_LIMIT BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT) -#elif (PHOENIX_CATCH_LIMIT < 1) -# error "PHOENIX_CATCH_LIMIT is set too low" -#endif - -#if !defined(PHOENIX_DYNAMIC_LIMIT) -# define PHOENIX_DYNAMIC_LIMIT PHOENIX_LIMIT -#elif (PHOENIX_DYNAMIC_LIMIT < 1) -# error "PHOENIX_DYNAMIC_LIMIT is set too low" -#endif - -#if !defined(PHOENIX_LOCAL_LIMIT) -# define PHOENIX_LOCAL_LIMIT PHOENIX_LIMIT -#elif (PHOENIX_LOCAL_LIMIT < 3) -# error "PHOENIX_LOCAL_LIMIT is set too low" -#endif - - -#if !defined(FUSION_MAX_VECTOR_SIZE) -# define FUSION_MAX_VECTOR_SIZE PHOENIX_LIMIT -#elif (FUSION_MAX_VECTOR_SIZE < PHOENIX_LIMIT) -# error "FUSION_MAX_VECTOR_SIZE < PHOENIX_LIMIT" -#endif - -// this include will bring in mpl::vectorN and -// fusion::vectorN where N is PHOENIX_LIMIT -#include <boost/fusion/include/vector.hpp> - -// for some reason, this must be included now to make -// detail/type_deduction.hpp compile. $$$ TODO: Investigate further $$$ -#include <boost/mpl/vector/vector20.hpp> - -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp deleted file mode 100644 index 029fbbf..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp +++ /dev/null @@ -1,42 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_NOTHING_HPP -#define PHOENIX_CORE_NOTHING_HPP - -#include <boost/spirit/home/phoenix/core/actor.hpp> -#include <boost/mpl/bool.hpp> - -namespace boost { namespace phoenix -{ -/////////////////////////////////////////////////////////////////////////////// -// -// null_actor -// -// A actor that does nothing (a "bum", if you will :-). -// -/////////////////////////////////////////////////////////////////////////////// - struct null_actor - { - typedef mpl::false_ no_nullary; - - template <typename Env> - struct result - { - typedef void type; - }; - - template <typename Env> - void - eval(Env const&) const - { - } - }; - - actor<null_actor> const nothing = null_actor(); -}} - -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp deleted file mode 100644 index 2e1f588..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_REFERENCE_HPP -#define PHOENIX_CORE_REFERENCE_HPP - -#include <boost/spirit/home/phoenix/core/actor.hpp> -#include <boost/static_assert.hpp> -#include <boost/type_traits/is_reference.hpp> -#include <boost/mpl/bool.hpp> - -namespace boost { namespace phoenix -{ - template <typename T> - struct reference - { - // $$$ TODO: a better (user friendly) static assert - BOOST_STATIC_ASSERT( - mpl::not_<is_reference<T> >::value != 0); - - typedef mpl::false_ no_nullary; - - template <typename Env> - struct result - { - typedef T& type; - }; - - reference(T& arg) - : ref(arg) {} - - template <typename Env> - T& eval(Env const&) const - { - return ref; - } - - T& ref; - - private: - // silence MSVC warning C4512: assignment operator could not be generated - reference& operator= (reference const&); - }; - - template <typename T> - inline actor<reference<T> > const - ref(T& v) - { - return reference<T>(v); - } - - template <typename T> - inline actor<reference<T const> > const - cref(T const& v) - { - return reference<T const>(v); - } - - namespace detail - { - struct error_attempting_to_convert_an_actor_to_a_reference {}; - } - - template <typename Base> - void - ref(actor<Base> const& v - , detail::error_attempting_to_convert_an_actor_to_a_reference - = detail::error_attempting_to_convert_an_actor_to_a_reference()); - - template <typename Base> - void - cref(actor<Base> const& v - , detail::error_attempting_to_convert_an_actor_to_a_reference - = detail::error_attempting_to_convert_an_actor_to_a_reference()); -}} - -#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp deleted file mode 100644 index a275a7d..0000000 --- a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef PHOENIX_CORE_VALUE_HPP -#define PHOENIX_CORE_VALUE_HPP - -#include <boost/spirit/home/phoenix/core/actor.hpp> -#include <boost/spirit/home/phoenix/core/as_actor.hpp> -#include <boost/static_assert.hpp> - -#include <boost/type_traits/is_reference.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/type_traits/is_pointer.hpp> -#include <boost/type_traits/add_const.hpp> -#include <boost/type_traits/add_reference.hpp> -#include <boost/type_traits/remove_pointer.hpp> -#include <boost/type_traits/is_function.hpp> - -#include <boost/mpl/bool.hpp> -#include <boost/mpl/eval_if.hpp> -#include <boost/mpl/identity.hpp> - -namespace boost { namespace phoenix -{ - namespace meta - { - template<typename T> - struct const_ref - : add_reference<typename add_const<T>::type> - {}; - - template<typename T> - struct argument_type - : mpl::eval_if< - is_function<typename remove_pointer<T>::type>, - mpl::identity<T>, - const_ref<T> > - { - typedef T type; - }; - } - - template <typename T> - struct value - { - BOOST_STATIC_ASSERT( - mpl::not_<is_reference<T> >::value != 0); - - typedef mpl::false_ no_nullary; - - template <typename Env> - struct result - { - typedef T type; - }; - - value() - : val() {} - - value(T const& arg) - : val(arg) {} - - template <typename Env> - T const& - eval(Env const&) const - { - return val; - } - - T val; - }; - - template <typename Actor> - struct actor_value - { - typedef typename Actor::no_nullary no_nullary; - - template <typename Env> - struct result - { - typedef typename - remove_reference< - typename eval_result<Actor, Env>::type - >::type - type; - }; - - actor_value(Actor const& actor) - : actor(actor) {} - - template <typename Env> - typename result<Env>::type - eval(Env const& env) const - { - return actor.eval(env); - } - - Actor actor; - }; - - template <typename T> - inline typename as_actor<T>::type - val(T const& v) - { - return as_actor<T>::convert(v); - } - - template <typename Derived> - inline actor<actor_value<Derived> > - val(actor<Derived> const& actor) - { - return actor_value<Derived>(actor); - } - - template <typename T> - struct as_actor_base - { - typedef value<T> type; - - static value<T> - convert(typename meta::argument_type<T>::type x) - { - return value<T>(x); - } - }; - - // Sometimes it is necessary to auto-convert references to - // a value<T>. This happens when we are re-currying. This - // cannot happen through the standard public actor interfaces. - template <typename T> - struct as_actor_base<T&> - { - typedef value<T> type; - - static value<T> - convert(T& x) - { - return value<T>(x); - } - }; - - template <typename T, int N> - struct as_actor_base<T[N]> - { - typedef value<T const*> type; - - static value<T const*> - convert(T const x[N]) - { - return value<T const*>(x); - } - }; -}} - -#endif |