diff --git a/include/boost/spirit/home/lex/argument.hpp b/include/boost/spirit/home/lex/argument.hpp index edfee0be3..fbac3c1da 100644 --- a/include/boost/spirit/home/lex/argument.hpp +++ b/include/boost/spirit/home/lex/argument.hpp @@ -110,12 +110,6 @@ namespace boost { namespace spirit { namespace lex state_setter(Actor const& actor) : actor_(actor) {} - // see explanation for this constructor at the end of this file -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - state_setter(phoenix::actor, Actor const& actor) - : actor_(actor) {} -#endif - Actor actor_; }; @@ -190,12 +184,6 @@ namespace boost { namespace spirit { namespace lex value_setter(Actor const& actor) : actor_(actor) {} -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - // see explanation for this constructor at the end of this file - value_setter(phoenix::actor, Actor const& actor) - : actor_(actor) {} -#endif - Actor actor_; }; @@ -281,81 +269,6 @@ namespace boost { namespace spirit { namespace lex #endif }}} -/////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -namespace boost { namespace phoenix -{ - /////////////////////////////////////////////////////////////////////////// - // The specialization of as_actor_base<> below is needed to convert all - // occurrences of _state in places where it's used as a rvalue into the - // proper Phoenix actor (spirit::state_getter) accessing the lexer state. - template<> - struct as_actor_base > - { - typedef spirit::lex::state_getter type; - - static spirit::lex::state_getter - convert(actor) - { - return spirit::lex::state_getter(); - } - }; - - /////////////////////////////////////////////////////////////////////////// - // The specialization of as_composite<> below is needed to convert all - // assignments to _state (places where it's used as a lvalue) into the - // proper Phoenix actor (spirit::state_setter) allowing to change the - // lexer state. - template - struct as_composite, RHS> - { - // For an assignment to _state (a spirit::state_context actor), this - // specialization makes Phoenix's compose() function construct a - // spirit::state_setter actor from 1. the LHS, a spirit::state_getter - // actor (due to the specialization of as_actor_base<> above), - // and 2. the RHS actor. - // This is why spirit::state_setter needs a constructor which takes - // a dummy spirit::state_getter as its first argument in addition - // to its real, second argument (the RHS actor). - typedef spirit::lex::state_setter::type> type; - }; - - /////////////////////////////////////////////////////////////////////////// - // The specialization of as_actor_base<> below is needed to convert all - // occurrences of _val in places where it's used as a rvalue into the - // proper Phoenix actor (spirit::value_getter) accessing the token value. - template<> - struct as_actor_base > - { - typedef spirit::lex::value_getter type; - - static spirit::lex::value_getter - convert(actor) - { - return spirit::lex::value_getter(); - } - }; - - /////////////////////////////////////////////////////////////////////////// - // The specialization of as_composite<> below is needed to convert all - // assignments to _val (places where it's used as a lvalue) into the - // proper Phoenix actor (spirit::value_setter) allowing to change the - // token value. - template - struct as_composite, RHS> - { - // For an assignment to _val (a spirit::value_context actor), this - // specialization makes Phoenix's compose() function construct a - // spirit::value_setter actor from 1. the LHS, a spirit::value_getter - // actor (due to the specialization of as_actor_base<> above), - // and 2. the RHS actor. - // This is why spirit::value_setter needs a constructor which takes - // a dummy spirit::value_getter as its first argument in addition - // to its real, second argument (the RHS actor). - typedef spirit::lex::value_setter::type> type; - }; -}} -#endif #undef SPIRIT_DECLARE_ARG #endif diff --git a/include/boost/spirit/home/lex/argument_phoenix.hpp b/include/boost/spirit/home/lex/argument_phoenix.hpp index da24503c2..7989b0199 100644 --- a/include/boost/spirit/home/lex/argument_phoenix.hpp +++ b/include/boost/spirit/home/lex/argument_phoenix.hpp @@ -82,7 +82,6 @@ namespace boost { namespace spirit { namespace lex }}} /////////////////////////////////////////////////////////////////////////////// -#ifdef BOOST_SPIRIT_USE_PHOENIX_V3 BOOST_PHOENIX_DEFINE_EXPRESSION( (boost)(spirit)(lex)(value_setter) @@ -246,6 +245,4 @@ namespace boost { namespace phoenix {}; }} -#endif // BOOST_SPIRIT_USE_PHOENIX_V3 - #endif diff --git a/include/boost/spirit/home/lex/lexer/support_functions_expression.hpp b/include/boost/spirit/home/lex/lexer/support_functions_expression.hpp index 613a4a470..3c7572d8d 100644 --- a/include/boost/spirit/home/lex/lexer/support_functions_expression.hpp +++ b/include/boost/spirit/home/lex/lexer/support_functions_expression.hpp @@ -21,37 +21,6 @@ namespace boost { namespace spirit { namespace lex }}} /////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - -namespace boost { namespace spirit { namespace lex -{ - namespace expression - { - template - struct less - { - typedef phoenix::actor > type; - - static type make(Eval const & eval) - { - return lex::less_type(eval); - } - }; - - template - struct lookahead - { - typedef phoenix::actor > type; - - static type make(IdType const & id_type, State const & state) - { - return lex::lookahead_type(id_type, state); - } - }; - } -}}} - -#else // BOOST_SPIRIT_USE_PHOENIX_V3 BOOST_PHOENIX_DEFINE_EXPRESSION( (boost)(spirit)(lex)(less) @@ -130,6 +99,4 @@ namespace boost { namespace phoenix {}; }} -#endif // BOOST_SPIRIT_USE_PHOENIX_V3 - #endif diff --git a/include/boost/spirit/home/phoenix.hpp b/include/boost/spirit/home/phoenix.hpp deleted file mode 100644 index b14ea5dc8..000000000 --- a/include/boost/spirit/home/phoenix.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2008 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_SPIRIT_PHOENIX_APRIL_11_2008_0850AM) -#define BOOST_SPIRIT_PHOENIX_APRIL_11_2008_0850AM - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/algorithm.hpp b/include/boost/spirit/home/phoenix/algorithm.hpp deleted file mode 100644 index c3f760083..000000000 --- a/include/boost/spirit/home/phoenix/algorithm.hpp +++ /dev/null @@ -1,14 +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_ALGORITHM_HPP -#define PHOENIX_ALGORITHM_HPP - -#include -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/bind.hpp b/include/boost/spirit/home/phoenix/bind.hpp deleted file mode 100644 index 5a90d44aa..000000000 --- a/include/boost/spirit/home/phoenix/bind.hpp +++ /dev/null @@ -1,16 +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_BIND_HPP -#define PHOENIX_BIND_HPP - -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/bind/bind_function.hpp b/include/boost/spirit/home/phoenix/bind/bind_function.hpp deleted file mode 100644 index 9121fdc8c..000000000 --- a/include/boost/spirit/home/phoenix/bind/bind_function.hpp +++ /dev/null @@ -1,58 +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_BIND_BIND_FUNCTION_HPP -#define PHOENIX_BIND_BIND_FUNCTION_HPP - -#include -#include -#include - -namespace boost { namespace phoenix -{ - template - inline actor< - typename as_composite< - detail::function_eval<0> - , detail::function_ptr<0, RT, RT(*)()> - >::type> - bind(RT(*f)()) - { - typedef detail::function_ptr<0, RT, RT(*)()> fp_type; - return compose >(fp_type(f)); - } - - template - inline actor< - typename as_composite< - detail::function_eval<1> - , detail::function_ptr<1, RT, RT(*)(T0)> - , A0 - >::type> - bind(RT(*f)(T0), A0 const& _0) - { - typedef detail::function_ptr<1, RT, RT(*)(T0)> fp_type; - return compose >(fp_type(f), _0); - } - - template - inline actor< - typename as_composite< - detail::function_eval<2> - , detail::function_ptr<2, RT, RT(*)(T0, T1)> - , A0, A1 - >::type> - bind(RT(*f)(T0, T1), A0 const& _0, A1 const& _1) - { - typedef detail::function_ptr<2, RT, RT(*)(T0, T1)> fp_type; - return compose >(fp_type(f), _0, _1); - } - - // Bring in the rest of the function binders - #include -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/bind/bind_function_object.hpp b/include/boost/spirit/home/phoenix/bind/bind_function_object.hpp deleted file mode 100644 index 752ae3109..000000000 --- a/include/boost/spirit/home/phoenix/bind/bind_function_object.hpp +++ /dev/null @@ -1,40 +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_BIND_BIND_FUNCTION_OBJECT_HPP -#define PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP - -#include -#include - -namespace boost { namespace phoenix -{ - template - inline actor, F>::type> - bind(F const& f) - { - return compose >(f); - } - - template - inline actor, F, A0>::type> - bind(F const& f, A0 const& _0) - { - return compose >(f, _0); - } - - template - inline actor, F, A0, A1>::type> - bind(F const& f, A0 const& _0, A1 const& _1) - { - return compose >(f, _0, _1); - } - - // Bring in the rest of the function object binders - #include -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/bind/bind_member_function.hpp b/include/boost/spirit/home/phoenix/bind/bind_member_function.hpp deleted file mode 100644 index 9d31a3849..000000000 --- a/include/boost/spirit/home/phoenix/bind/bind_member_function.hpp +++ /dev/null @@ -1,77 +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_BIND_BIND_MEMBER_FUNCTION_HPP -#define PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP - -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - template - inline actor< - typename as_composite< - detail::function_eval<1> - , detail::member_function_ptr<0, RT, RT(ClassT::*)()> - , ClassA - >::type> - bind(RT(ClassT::*f)(), ClassA const& obj) - { - typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type; - return compose >(fp_type(f), obj); - } - - template - inline actor< - typename as_composite< - detail::function_eval<1> - , detail::member_function_ptr<0, RT, RT(ClassT::*)() const> - , ClassA - >::type> - bind(RT(ClassT::*f)() const, ClassA const& obj) - { - typedef detail::member_function_ptr<0, RT, RT(ClassT::*)() const> fp_type; - return compose >(fp_type(f), obj); - } - - template - inline actor< - typename as_composite< - detail::function_eval<1> - , detail::member_function_ptr<0, RT, RT(ClassT::*)()> - , actor > - >::type> - bind(RT(ClassT::*f)(), ClassT& obj) - { - typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type; - return compose >( - fp_type(f) - , actor >(reference(obj))); - } - - template - inline actor< - typename as_composite< - detail::function_eval<1> - , detail::member_function_ptr<0, RT, RT(ClassT::*)() const> - , actor > - >::type> - bind(RT(ClassT::*f)() const, ClassT& obj) - { - typedef detail::member_function_ptr<0, RT, RT(ClassT::*)() const> fp_type; - return compose >( - fp_type(f) - , actor >(reference(obj))); - } - - // Bring in the rest of the function binders - #include -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/bind/bind_member_variable.hpp b/include/boost/spirit/home/phoenix/bind/bind_member_variable.hpp deleted file mode 100644 index 3d1135182..000000000 --- a/include/boost/spirit/home/phoenix/bind/bind_member_variable.hpp +++ /dev/null @@ -1,105 +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_BIND_BIND_MEMBER_VARIABLE_HPP -#define PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - namespace detail - { - template - struct member_variable - { - template - struct result - { - typedef typename boost::mpl::if_< - boost::is_const< - typename boost::remove_pointer< - typename boost::remove_reference::type - >::type - > - , const RT& - , RT& - >::type type; - }; - - member_variable(MP mp) - : mp(mp) {} - - template - RT& operator()(Class& obj) const - { - return obj.*mp; - } - - template - RT& operator()(Class* obj) const - { - return obj->*mp; - } - - template - RT const& operator()(Class const& obj) const - { - return obj.*mp; - } - - template - RT const& operator()(Class const* obj) const - { - return obj->*mp; - } - - MP mp; - }; - } - - template - inline actor< - typename as_composite< - detail::function_eval<1> - , detail::member_variable - , ClassA - >::type> - bind(RT ClassT::*mp, ClassA const& obj) - { - typedef detail::member_variable mp_type; - return compose >(mp_type(mp), obj); - } - - template - inline actor< - typename as_composite< - detail::function_eval<1> - , detail::member_variable - , actor > - >::type> - bind(RT ClassT::*mp, ClassT& obj) - { - typedef detail::member_variable mp_type; - return compose >( - mp_type(mp) - , actor >(reference(obj))); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/bind/detail/bind_function.hpp b/include/boost/spirit/home/phoenix/bind/detail/bind_function.hpp deleted file mode 100644 index 8d6340d0d..000000000 --- a/include/boost/spirit/home/phoenix/bind/detail/bind_function.hpp +++ /dev/null @@ -1,53 +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_BIND_DETAIL_BIND_FUNCTION_HPP) -#define PHOENIX_BIND_DETAIL_BIND_FUNCTION_HPP - -#include -#include -#include -#include - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ - "boost/spirit/home/phoenix/bind/detail/bind_function.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template - inline actor< - typename as_composite< - detail::function_eval - , detail::function_ptr - , BOOST_PP_ENUM_PARAMS(N, A) - >::type> - bind(RT(*f)(BOOST_PP_ENUM_PARAMS(N, T)) - , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) - { - typedef detail::function_ptr< - N, RT, RT(*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; - return compose >( - fp_type(f), BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp b/include/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp deleted file mode 100644 index 4e4984d61..000000000 --- a/include/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp +++ /dev/null @@ -1,43 +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_BIND_DETAIL_BIND_FUNCTION_OBJECT_HPP) -#define PHOENIX_BIND_DETAIL_BIND_FUNCTION_OBJECT_HPP - -#include -#include -#include -#include - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ - "boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template - inline actor, F - , BOOST_PP_ENUM_PARAMS(N, A)>::type> - bind(F const& f, BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) - { - return compose >(f, BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp b/include/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp deleted file mode 100644 index 315f56fc9..000000000 --- a/include/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp +++ /dev/null @@ -1,132 +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_BIND_DETAIL_BIND_MEMBER_FUNCTION_HPP) -#define PHOENIX_BIND_DETAIL_BIND_MEMBER_FUNCTION_HPP - -#include -#include -#include -#include -#include - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT)), \ - "boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template - inline actor< - typename as_composite< - detail::function_eval - , detail::member_function_ptr - , ClassA, BOOST_PP_ENUM_PARAMS(N, A) - >::type> - bind( - RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) - , ClassA const& obj - , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) - { - typedef detail::member_function_ptr< - N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; - return compose >( - fp_type(f), obj, BOOST_PP_ENUM_PARAMS(N, _)); - } - - template - inline actor< - typename as_composite< - detail::function_eval - , detail::member_function_ptr - , ClassA, BOOST_PP_ENUM_PARAMS(N, A) - >::type> - bind( - RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) const - , ClassA const& obj - , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) - { - typedef detail::member_function_ptr< - N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> fp_type; - return compose >( - fp_type(f), obj, BOOST_PP_ENUM_PARAMS(N, _)); - } - - template - inline actor< - typename as_composite< - detail::function_eval - , detail::member_function_ptr - , actor > - , BOOST_PP_ENUM_PARAMS(N, A) - >::type> - bind( - RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) - , ClassT& obj - , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) - { - typedef detail::member_function_ptr< - N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; - return compose >( - fp_type(f) - , actor >(reference(obj)) - , BOOST_PP_ENUM_PARAMS(N, _)); - } - - template - inline actor< - typename as_composite< - detail::function_eval - , detail::member_function_ptr - , actor > - , BOOST_PP_ENUM_PARAMS(N, A) - >::type> - bind( - RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) const - , ClassT& obj - , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) - { - typedef detail::member_function_ptr< - N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> fp_type; - return compose >( - fp_type(f) - , actor >(reference(obj)) - , BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp b/include/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp deleted file mode 100644 index a2352cd7e..000000000 --- a/include/boost/spirit/home/phoenix/bind/detail/function_ptr.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) -==============================================================================*/ -#if !defined(BOOST_PP_IS_ITERATING) -#if !defined(PHOENIX_BIND_DETAIL_FUNCTION_PTR_HPP) -#define PHOENIX_BIND_DETAIL_FUNCTION_PTR_HPP - -#include -#include -#include -#include - -namespace boost { namespace phoenix { namespace detail -{ - template - struct function_ptr_impl - { - template - struct impl; - }; - - template - struct function_ptr : function_ptr_impl::template impl - { - typedef typename function_ptr_impl::template impl base; - function_ptr(FP fp) - : base(fp) {} - }; - - template <> - struct function_ptr_impl<0> - { - template - struct impl - { - typedef RT result_type; - - impl(FP fp) - : fp(fp) {} - - RT operator()() const - { - return fp(); - } - - FP fp; - }; - }; - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/bind/detail/function_ptr.hpp")) -#include BOOST_PP_ITERATE() - -}}} // namespace boost::phoenix::detail - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template <> - struct function_ptr_impl - { - template - struct impl - { - template - struct result - { - typedef RT type; - }; - - impl(FP fp) - : fp(fp) {} - - template - RT operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const - { - return fp(BOOST_PP_ENUM_PARAMS(N, _)); - } - - FP fp; - }; - }; - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp b/include/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp deleted file mode 100644 index 2c11510ce..000000000 --- a/include/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp +++ /dev/null @@ -1,119 +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_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP) -#define PHOENIX_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix { namespace detail -{ - template - struct member_function_ptr_impl - { - template - struct impl; - }; - - template - struct member_function_ptr - : member_function_ptr_impl::template impl - { - typedef typename member_function_ptr_impl:: - template impl base; - member_function_ptr(FP fp) - : base(fp) {} - }; - - template <> - struct member_function_ptr_impl<0> - { - template - struct impl - { - template - struct result - { - typedef RT type; - }; - - impl(FP fp) - : fp(fp) {} - - template - RT operator()(Class& obj) const - { - return (obj.*fp)(); - } - - template - RT operator()(Class* obj) const - { - return (obj->*fp)(); - } - - FP fp; - }; - }; - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp")) -#include BOOST_PP_ITERATE() - -}}} // namespace boost::phoenix::detail - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template <> - struct member_function_ptr_impl - { - template - struct impl - { - template - struct result - { - typedef RT type; - }; - - impl(FP fp) - : fp(fp) {} - - template - RT operator()(Class& obj, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const - { - return (obj.*fp)(BOOST_PP_ENUM_PARAMS(N, _)); - } - - template - RT operator()(Class* obj, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const - { - return (obj->*fp)(BOOST_PP_ENUM_PARAMS(N, _)); - } - - FP fp; - }; - }; - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/container.hpp b/include/boost/spirit/home/phoenix/container.hpp deleted file mode 100644 index fb6ec3f9f..000000000 --- a/include/boost/spirit/home/phoenix/container.hpp +++ /dev/null @@ -1,12 +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_CONTAINER_HPP -#define PHOENIX_CONTAINER_HPP - -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/core.hpp b/include/boost/spirit/home/phoenix/core.hpp deleted file mode 100644 index 7dfefb3d1..000000000 --- a/include/boost/spirit/home/phoenix/core.hpp +++ /dev/null @@ -1,23 +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_HPP -#define PHOENIX_CORE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/core/actor.hpp b/include/boost/spirit/home/phoenix/core/actor.hpp deleted file mode 100644 index 6ff48e9e7..000000000 --- a/include/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 - -#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 -#include -#include -#include -#include -#include - -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 - struct make_assign_composite; - - template - struct make_index_composite; - - template - struct comma_result; - - // error no arguments supplied - struct error_expecting_arguments - { - template - error_expecting_arguments(T const&) {} - }; - } - - template - struct eval_result - { - typedef typename Eval::template result::type type; - }; - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable: 4522) // multiple assignment operators specified warning -#endif - - template - struct actor : Eval - { - typedef actor self_type; - typedef Eval eval_type; - - template struct result {}; - - actor() - : Eval() {} - - actor(Eval const& base) - : Eval(base) {} - - template - explicit actor(T0 const& _0) - : Eval(_0) {} - - template - 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 - , eval_result > - >::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 - struct result - : eval_result< - eval_type - , basic_environment< - typename remove_reference::type - > - > - {}; - - template - typename result::type - operator()(T0& _0) const - { - return eval_type::eval(basic_environment(_0)); - } - - template - struct result - : eval_result< - eval_type - , basic_environment< - typename remove_reference::type - , typename remove_reference::type - > - > - {}; - - template - typename result::type - operator()(T0& _0, T1& _1) const - { - return eval_type::eval(basic_environment(_0, _1)); - } - - template - typename detail::make_assign_composite::type - operator=(T1 const& a1) const; - - template - typename detail::make_index_composite::type - operator[](T1 const& a1) const; - - // Bring in the rest of the constructors and function call operators - #include - }; - -#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 - struct comma_result; - } - - template - typename detail::comma_result::type - operator,(actor const& a0, actor const& a1); -}} - -namespace boost -{ - template - struct result_of()> - { - typedef typename phoenix::actor::nullary_result type; - }; - - template - struct result_of const()> - : result_of()> - {}; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/core/argument.hpp b/include/boost/spirit/home/phoenix/core/argument.hpp deleted file mode 100644 index 1679cb2b3..000000000 --- a/include/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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define PHOENIX_DECLARE_ARG(z, n, data) \ - typedef actor > \ - BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(n)), _type); \ - actor > const \ - BOOST_PP_CAT(arg, BOOST_PP_INC(n)) = argument(); \ - typedef actor > \ - BOOST_PP_CAT(BOOST_PP_CAT(_, BOOST_PP_INC(n)), _type); \ - actor > const \ - BOOST_PP_CAT(_, BOOST_PP_INC(n)) = argument(); - -namespace boost { namespace phoenix -{ - namespace detail - { - template - struct error_argument_not_found {}; - inline void test_invalid_argument(int) {} - } - - template - struct argument - { - typedef mpl::true_ no_nullary; - - template - struct result - { - typedef typename - fusion::result_of::at >::type - type; - }; - - template - typename result::type - eval(Env const& env) const - { - typedef typename - mpl::if_< - mpl::less, mpl::size > - , int - , detail::error_argument_not_found > - >::type - check_out_of_bounds; - - detail::test_invalid_argument(check_out_of_bounds()); - return fusion::at_c(env.args()); - } - }; - - namespace arg_names - { - // Phoenix style names - typedef actor > arg1_type; - actor > const arg1 = argument<0>(); - typedef actor > arg2_type; - actor > const arg2 = argument<1>(); - typedef actor > arg3_type; - actor > const arg3 = argument<2>(); - - // BLL style names - typedef actor > _1_type; - actor > const _1 = argument<0>(); - typedef actor > _2_type; - actor > const _2 = argument<1>(); - typedef actor > _3_type; - actor > 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/include/boost/spirit/home/phoenix/core/as_actor.hpp b/include/boost/spirit/home/phoenix/core/as_actor.hpp deleted file mode 100644 index 36f0aacb6..000000000 --- a/include/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 - -namespace boost { namespace phoenix -{ - template - struct as_actor_base; // defined in value.hpp - - template - struct as_actor_base > - { - typedef Base type; - - static Base const& - convert(actor const& x) - { - return x; - } - }; - - template <> - struct as_actor_base - { - 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 - { - 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 - struct as_actor - { - typedef actor::type> type; - - static type - convert(T const& x) - { - return as_actor_base::convert(x); - } - }; -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/core/basic_environment.hpp b/include/boost/spirit/home/phoenix/core/basic_environment.hpp deleted file mode 100644 index 5ef82234c..000000000 --- a/include/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 -#include -#include -#include -#include -#include -#include -#include -#include - -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::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 - >::type - >::type - tie_type; - - basic_environment() - : args_() {} - - template - explicit basic_environment(U0& _0) - : args_(_0) {} - - template - basic_environment(U0& _0, U1& _1) - : args_(_0, _1) {} - - // Bring in the rest of the constructors - #include - - tie_type const& - args() const - { - return args_; - } - - tie_type& - args() - { - return args_; - } - - private: - - tie_type args_; - }; -}} - -#endif - diff --git a/include/boost/spirit/home/phoenix/core/compose.hpp b/include/boost/spirit/home/phoenix/core/compose.hpp deleted file mode 100644 index d53611376..000000000 --- a/include/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 -#include -#include -#include -#include -#include -#include -#include -#include - -#define PHOENIX_AS_ACTOR(z, n, data) \ - typename mpl::eval_if< \ - is_same \ - , mpl::identity \ - , as_actor_base \ - >::type - -namespace boost { namespace phoenix -{ - -/////////////////////////////////////////////////////////////////////////////// -// -// as_composite 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(_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 - inline actor::type> - compose() - { - return actor::type>(); - } - - template - inline actor::type> - compose(T0 const& _0) - { - return actor::type>( - as_actor::convert(_0) - ); - } - - template - inline actor::type> - compose(T0 const& _0, T1 const& _1) - { - return actor::type>( - as_actor::convert(_0) - , as_actor::convert(_1) - ); - } - - // Bring in the the rest of the compose overloads - #include - -/////////////////////////////////////////////////////////////////////////////// -// -// re_curry -// -// 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/include/boost/spirit/home/phoenix/core/composite.hpp b/include/boost/spirit/home/phoenix/core/composite.hpp deleted file mode 100644 index 283bdc24f..000000000 --- a/include/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 -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - namespace detail - { - template - struct composite_eval; - - struct compute_no_nullary - { - template - struct apply - { - typedef typename - mpl::or_::type - type; - }; - }; - } - - template - struct composite : EvalTuple - { - typedef EvalTuple base_type; - typedef composite self_type; - typedef EvalPolicy eval_policy_type; - - typedef typename - mpl::fold< - EvalTuple - , mpl::false_ - , detail::compute_no_nullary - >::type - no_nullary; - - template - struct result - { - typedef - typename detail::composite_eval< - fusion::result_of::size::value>:: - template result::type - type; - }; - - composite() - : base_type() {} - - composite(base_type const& base) - : base_type(base) {} - - template - composite(U0& _0) - : base_type(_0) {} - - template - composite(U0& _0, U1& _1) - : base_type(_0, _1) {} - - template - typename result::type - eval(Env const& env) const - { - typedef typename result::type return_type; - return detail:: - composite_eval::value>::template - call(*this, env); - } - - // Bring in the rest of the constructors - #include - }; - - // Bring in the detail::composite_eval<0..N> definitions - #include -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/core/detail/actor.hpp b/include/boost/spirit/home/phoenix/core/detail/actor.hpp deleted file mode 100644 index 66666c547..000000000 --- a/include/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 -#include -#include -#include - -#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 - actor(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) - : Eval(BOOST_PP_ENUM_PARAMS(N, _)) {} - - template - struct result - : eval_result< - eval_type - , basic_environment< - BOOST_PP_ENUM_BINARY_PARAMS( - N - , typename remove_reference::type BOOST_PP_INTERCEPT - ) - > - > - {}; - - template - 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, _)) - ); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/core/detail/basic_environment.hpp b/include/boost/spirit/home/phoenix/core/detail/basic_environment.hpp deleted file mode 100644 index 986ecf2b3..000000000 --- a/include/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 -#include -#include - -#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 - 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/include/boost/spirit/home/phoenix/core/detail/compose.hpp b/include/boost/spirit/home/phoenix/core/detail/compose.hpp deleted file mode 100644 index 945a3d3f1..000000000 --- a/include/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 -#include - -#define PHOENIX_AS_ACTOR_CONVERT(z, n, data) \ - as_actor::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 - inline actor< - typename as_composite::type> - compose(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) - { - return actor< - typename as_composite::type>( - BOOST_PP_ENUM(N, PHOENIX_AS_ACTOR_CONVERT, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/core/detail/composite.hpp b/include/boost/spirit/home/phoenix/core/detail/composite.hpp deleted file mode 100644 index 6970f7c96..000000000 --- a/include/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 - -#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 - 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/include/boost/spirit/home/phoenix/core/detail/composite_eval.hpp b/include/boost/spirit/home/phoenix/core/detail/composite_eval.hpp deleted file mode 100644 index 14f12afbc..000000000 --- a/include/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 -#include -#include - - namespace detail - { - template - struct composite_eval; - - template <> - struct composite_eval<0> - { - template - struct result - { - typedef typename Composite::eval_policy_type:: - template result::type - type; - }; - - template - static RT - call(Composite const& /*composite*/, Env const& env) - { - typedef typename Composite::eval_policy_type eval_policy_type; - return eval_policy_type::template eval(env); - } - }; - - template - struct eval_is_actor - : is_actor::type> {}; - - template - struct eval_is_void - : is_same::type, fusion::void_> {}; - } - -#define PHOENIX_GET_ACTOR_TYPE(z, n, data) \ - typedef \ - typename fusion::result_of::value_at_c::type \ - BOOST_PP_CAT(actor, n); - -#define PHOENIX_GET_ACTOR(z, n, data) \ - fusion::at_c(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 - { - template - 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 - static RT - call(Composite const& composite, Env const& env) - { - typedef typename Composite::eval_policy_type eval_policy_type; - return eval_policy_type::template eval( - env, BOOST_PP_ENUM(N, PHOENIX_GET_ACTOR, _)); - } - }; - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/core/detail/composite_info.hpp b/include/boost/spirit/home/phoenix/core/detail/composite_info.hpp deleted file mode 100644 index 48cebea88..000000000 --- a/include/boost/spirit/home/phoenix/core/detail/composite_info.hpp +++ /dev/null @@ -1,40 +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_DETAIL_COMPOSITE_INFO_HPP -#define PHOENIX_CORE_DETAIL_COMPOSITE_INFO_HPP - -#include -#include -#include -#include - -namespace boost { namespace phoenix { namespace detail -{ - struct max_nesting - { - template - struct result : - mpl::if_< - mpl::greater - , typename T::nesting - , State - > - {}; - }; - - template - struct compute_nesting - { - typedef typename - fusion::meta::fold, max_nesting>::type - type; - }; - -}}} - -#endif - diff --git a/include/boost/spirit/home/phoenix/core/detail/function_eval.hpp b/include/boost/spirit/home/phoenix/core/detail/function_eval.hpp deleted file mode 100644 index 711b32c4b..000000000 --- a/include/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 -#include -#include -#include -#include -#include -#include -#include -#include - -// we assume that mpl::vectorN, where N = PHOENIX_COMPOSITE_LIMIT -// is included already. - -namespace boost { namespace phoenix { namespace detail -{ - template - struct function_eval; - - template <> - struct function_eval<0> - { - template - struct result - { - typedef typename - remove_reference< - typename F::template result::type - >::type - fn; - typedef typename fn::result_type type; - }; - - template - static RT - eval(Env const& env, F const& f) - { - return f.eval(env)(); - } - }; - - template - T& help_rvalue_deduction(T& x) - { - return x; - } - - template - 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::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 - { - template - struct result - { - typedef typename - remove_reference< - typename F::template result::type - >::type - fn; - BOOST_PP_REPEAT(N, PHOENIX_GET_ARG, _) - - typedef BOOST_PP_CAT(mpl::vector, N) - - args; - - typedef typename - fn::template result - function_apply; - - typedef typename - mpl::eval_if< - is_same< - typename mpl::find::type - , typename mpl::end::type> - , function_apply - , mpl::identity - >::type - type; - }; - - template - 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/include/boost/spirit/home/phoenix/core/is_actor.hpp b/include/boost/spirit/home/phoenix/core/is_actor.hpp deleted file mode 100644 index ba0e77cbf..000000000 --- a/include/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 -#include - -namespace boost { namespace phoenix -{ -/////////////////////////////////////////////////////////////////////////////// -// -// is_actor -// -// Tests if T is an actor. Evaluates to mpl::true_ or mpl::false_ -// -/////////////////////////////////////////////////////////////////////////////// - template - struct is_actor : mpl::false_ {}; - - template - struct is_actor > : mpl::true_ {}; -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/core/limits.hpp b/include/boost/spirit/home/phoenix/core/limits.hpp deleted file mode 100644 index 50c757324..000000000 --- a/include/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 - -#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 - -// for some reason, this must be included now to make -// detail/type_deduction.hpp compile. $$$ TODO: Investigate further $$$ -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/core/nothing.hpp b/include/boost/spirit/home/phoenix/core/nothing.hpp deleted file mode 100644 index 029fbbfdf..000000000 --- a/include/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 -#include - -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 - struct result - { - typedef void type; - }; - - template - void - eval(Env const&) const - { - } - }; - - actor const nothing = null_actor(); -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/core/reference.hpp b/include/boost/spirit/home/phoenix/core/reference.hpp deleted file mode 100644 index 2e1f588cb..000000000 --- a/include/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 -#include -#include -#include - -namespace boost { namespace phoenix -{ - template - struct reference - { - // $$$ TODO: a better (user friendly) static assert - BOOST_STATIC_ASSERT( - mpl::not_ >::value != 0); - - typedef mpl::false_ no_nullary; - - template - struct result - { - typedef T& type; - }; - - reference(T& arg) - : ref(arg) {} - - template - 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 - inline actor > const - ref(T& v) - { - return reference(v); - } - - template - inline actor > const - cref(T const& v) - { - return reference(v); - } - - namespace detail - { - struct error_attempting_to_convert_an_actor_to_a_reference {}; - } - - template - void - ref(actor const& v - , detail::error_attempting_to_convert_an_actor_to_a_reference - = detail::error_attempting_to_convert_an_actor_to_a_reference()); - - template - void - cref(actor 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/include/boost/spirit/home/phoenix/core/value.hpp b/include/boost/spirit/home/phoenix/core/value.hpp deleted file mode 100644 index 5cfd94a71..000000000 --- a/include/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 -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace boost { namespace phoenix -{ - namespace meta - { - template - struct const_ref - : add_reference::type> - {}; - - template - struct argument_type - : mpl::eval_if< - is_function::type>, - mpl::identity, - const_ref > - { - typedef T type; - }; - } - - template - struct value - { - BOOST_STATIC_ASSERT( - mpl::not_ >::value != 0); - - typedef mpl::false_ no_nullary; - - template - struct result - { - typedef T type; - }; - - value() - : val() {} - - value(T const& arg) - : val(arg) {} - - template - T const& - eval(Env const&) const - { - return val; - } - - T val; - }; - - template - struct actor_value - { - typedef typename Actor::no_nullary no_nullary; - - template - struct result - { - typedef typename - remove_reference< - typename eval_result::type - >::type - type; - }; - - actor_value(Actor const& actor_) - : actor(actor_) {} - - template - typename result::type - eval(Env const& env) const - { - return actor.eval(env); - } - - Actor actor; - }; - - template - inline typename as_actor::type - val(T const& v) - { - return as_actor::convert(v); - } - - template - inline actor > - val(actor const& actor) - { - return actor_value(actor); - } - - template - struct as_actor_base - { - typedef value type; - - static value - convert(typename meta::argument_type::type x) - { - return value(x); - } - }; - - // Sometimes it is necessary to auto-convert references to - // a value. This happens when we are re-currying. This - // cannot happen through the standard public actor interfaces. - template - struct as_actor_base - { - typedef value type; - - static value - convert(T& x) - { - return value(x); - } - }; - - template - struct as_actor_base - { - typedef value type; - - static value - convert(T const x[N]) - { - return value(x); - } - }; -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/detail/local_reference.hpp b/include/boost/spirit/home/phoenix/detail/local_reference.hpp deleted file mode 100644 index ad1fdb4ab..000000000 --- a/include/boost/spirit/home/phoenix/detail/local_reference.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-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_DETAIL_LOCAL_REFERENCE_HPP -#define PHOENIX_DETAIL_LOCAL_REFERENCE_HPP - -#include - -namespace boost { namespace phoenix { namespace detail -{ - template - struct local_reference - { - typedef T type; - - explicit local_reference(T& t): t_(boost::addressof(t)) {} - operator T& () const { return *t_; } - local_reference& operator=(T const& x) { *t_ = x; return *this; } - local_reference const& operator=(T const& x) const { *t_ = x; return *this; } - T& get() const { return *t_; } - T* get_pointer() const { return t_; } - - private: - - T* t_; - }; - - template - struct unwrap_local_reference - { - typedef T type; // T should be a reference - }; - - template - struct unwrap_local_reference > - { - typedef T type; // unwrap the reference; T is a value - }; -}}} - -#endif diff --git a/include/boost/spirit/home/phoenix/detail/type_deduction.hpp b/include/boost/spirit/home/phoenix/detail/type_deduction.hpp deleted file mode 100644 index 2c80df2e0..000000000 --- a/include/boost/spirit/home/phoenix/detail/type_deduction.hpp +++ /dev/null @@ -1,491 +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_DETAIL_TYPE_DEDUCTION_HPP -#define PHOENIX_DETAIL_TYPE_DEDUCTION_HPP - -/*============================================================================= - - Return Type Deduction - [JDG Sept. 15, 2003] - - Before C++ adopts the typeof, there is currently no way to deduce the - result type of an expression such as x + y. This deficiency is a major - problem with template metaprogramming; for example, when writing - forwarding functions that attempt to capture the essence of an - expression inside a function. Consider the std::plus: - - template - struct plus : public binary_function - { - T operator()(T const& x, T const& y) const - { - return x + y; - } - }; - - What's wrong with this? Well, this functor does not accurately capture - the behavior of the plus operator. 1) It does not handle the case where - x and y are of different types (e.g. x is short and y is int). 2) It - assumes that the arguments and return type are the same (i.e. when - adding a short and an int, the return type ought to be an int). Due to - these shortcomings, std::plus(x, y) is a poor substitute for x + y. - - The case where x is short and y is int does not really expose the - problem. We can simply use std::plus and be happy that the - operands x and y will simply be converted to an int. The problem - becomes evident when an operand is a user defined type such as bigint. - Here, the conversion to bigint is simply not acceptable. Even if the - unnecessary conversion is tolerable, in generic code, it is not always - possible to choose the right T type that can accomodate both x and y - operands. - - To truly model the plus operator, what we need is a polymorphic functor - that can take arbitrary x and y operands. Here's a rough schematic: - - struct plus - { - template - unspecified-type - operator()(X const& x, Y const& y) const - { - return x + y; - } - }; - - Now, we can handle the case where X and Y are arbitrary types. We've - solved the first problem. To solve the second problem, we need some - form of return type deduction mechanism. If we had the typeof, it would - be something like: - - template - typeof(X() + Y()) - operator()(X const& x, Y const& y) const - { - return x + y; - } - - Without the typeof facility, it is only possible to wrap an expression - such as x + y in a function or functor if we are given a hint that - tells us what the actual result type of such an expression is. Such a - hint can be in the form of a metaprogram, that, given the types of the - arguments, will return the result type. Example: - - template - struct result_of_plus - { - typedef unspecified-type type; - }; - - Given a result_of_plus metaprogram, we can complete our polymorphic - plus functor: - - struct plus - { - template - typename result_of_plus::type - operator()(X const& x, Y const& y) const - { - return x + y; - } - }; - - The process is not automatic. We have to specialize the metaprogram for - specific argument types. Examples: - - template <> - struct result_of_plus - { - typedef int type; - }; - - template - struct result_of_plus, std::complex > - { - typedef std::complex type; - }; - - To make it easier for the user, specializations are provided for common - types such as primitive c++ types (e.g. int, char, double, etc.), and - standard types (e.g. std::complex, iostream, std containers and - iterators). - - To further improve the ease of use, for user defined classes, we can - supply a few more basic specializations through metaprogramming using - heuristics based on canonical operator rules (Such heuristics can be - found in the LL and Phoenix, for example). For example, it is rather - common that the result of x += y is X& or the result of x || y is a - bool. The client is out of luck if her classes do not follow the - canonical rules. She'll then have to supply her own specialization. - - The type deduction mechanism demostrated below approaches the problem - not through specialization and heuristics, but through a limited form - of typeof mechanism. The code does not use heuristics, hence, no - guessing games. The code takes advantage of the fact that, in general, - the result type of an expression is related to one its arguments' type. - For example, x + y, where x has type int and y has type double, has the - result type double (the second operand type). Another example, x[y] - where x is a vector and y is a std::size_t, has the result type - vector::reference (the vector's reference type type). - - The limited form of type deduction presented can detect common - relations if the result of a binary or unary operation, given arguments - x and y with types X and Y (respectively), is X, Y, X&, Y&, X*, Y*, X - const*, Y const*, bool, int, unsigned, double, container and iterator - elements (e.g the T, where X is: T[N], T*, vector, map, - vector::iterator). More arguments/return type relationships can be - established if needed. - - A set of overloaded test(T) functions capture these argument related - types. Each test(T) function returns a distinct type that can be used - to determine the exact type of an expression. - - Consider: - - template - x_value_type - test(X const&); - - template - y_value_type - test(Y const&); - - Given an expression x + y, where x is int and y is double, the call to: - - test(x + y) - - will return a y_value_type. - - Now, if we rig x_value_type and y_value_type such that both have unique - sizes, we can use sizeof(test(x + y)) to determine if the result - type is either X or Y. - - For example, if: - - sizeof(test(x + y)) == sizeof(y_value_type) - - then, we know for sure that the result of x + y has type Y. - - The same basic scheme can be used to detect more argument-dependent - return types where the sizeof the test(T) return type is used to index - through a boost::mpl vector which holds each of the corresponding - result types. - -==============================================================================*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost -{ - struct error_cant_deduce_type {}; -} - -namespace boost { namespace type_deduction_detail -{ - typedef char(&bool_value_type)[1]; - typedef char(&int_value_type)[2]; - typedef char(&uint_value_type)[3]; - typedef char(&double_value_type)[4]; - - typedef char(&bool_reference_type)[5]; - typedef char(&int_reference_type)[6]; - typedef char(&uint_reference_type)[7]; - typedef char(&double_reference_type)[8]; - - typedef char(&x_value_type)[9]; - typedef char(&x_reference_type)[10]; - typedef char(&x_const_pointer_type)[11]; - typedef char(&x_pointer_type)[12]; - - typedef char(&y_value_type)[13]; - typedef char(&y_reference_type)[14]; - typedef char(&y_const_pointer_type)[15]; - typedef char(&y_pointer_type)[16]; - - typedef char(&container_reference_type)[17]; - typedef char(&container_const_reference_type)[18]; - typedef char(&container_mapped_type)[19]; - - typedef char(&cant_deduce_type)[20]; - - template ::type> - struct is_basic - : mpl::or_< - is_same - , is_same - , is_same - , is_same - > {}; - - template - struct reference_type - { - typedef typename C::reference type; - }; - - template - struct reference_type - : reference_type {}; - - template - struct reference_type - { - typedef T& type; - }; - - template - struct reference_type - { - typedef T& type; - }; - - template - struct const_reference_type - { - typedef typename C::const_reference type; - }; - - template - struct mapped_type - { - typedef typename C::mapped_type type; - }; - - struct asymmetric; - - template - cant_deduce_type - test(...); // The black hole !!! - - template - bool_value_type - test(bool const&); - - template - int_value_type - test(int const&); - - template - uint_value_type - test(unsigned const&); - - template - double_value_type - test(double const&); - - template - bool_reference_type - test(bool&); - - template - int_reference_type - test(int&); - - template - uint_reference_type - test(unsigned&); - - template - double_reference_type - test(double&); - - template - typename disable_if< - mpl::or_, is_const > - , x_value_type - >::type - test(X const&); - - template - typename disable_if< - is_basic - , x_reference_type - >::type - test(X&); - - template - typename disable_if< - mpl::or_< - is_basic - , is_const - > - , x_const_pointer_type - >::type - test(X const*); - - template - x_pointer_type - test(X*); - - template - typename disable_if< - mpl::or_< - is_basic - , is_same - , is_const - , is_same - > - , y_value_type - >::type - test(Y const&); - - template - typename disable_if< - mpl::or_< - is_basic - , is_same - , is_same - > - , y_reference_type - >::type - test(Y&); - - template - typename disable_if< - mpl::or_< - is_same - , is_const - , is_same - > - , y_const_pointer_type - >::type - test(Y const*); - - template - typename disable_if< - mpl::or_< - is_same - , is_same - > - , y_pointer_type - >::type - test(Y*); - - template - typename disable_if< - mpl::or_< - is_basic - , is_same::type, typename X::reference> - > - , container_reference_type - >::type - test(typename X::reference); - - template - typename enable_if< - mpl::and_< - mpl::or_, is_pointer > - , mpl::not_ > - , mpl::not_ > - > - , container_reference_type - >::type - test(Z&); - - template - typename disable_if< - mpl::or_< - is_basic - , is_same::type, typename X::const_reference> - > - , container_const_reference_type - >::type - test(typename X::const_reference); - - template - typename disable_if< - is_basic - , container_mapped_type - >::type - test(typename X::mapped_type); - - template - struct base_result_of - { - typedef typename phoenix::detail::unwrap_local_reference::type x_type_; - typedef typename phoenix::detail::unwrap_local_reference::type y_type_; - typedef typename remove_reference::type x_type; - typedef typename remove_reference::type y_type; - - typedef mpl::vector20< - mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , mpl::identity - , reference_type - , const_reference_type - , mapped_type - , mpl::identity - > - types; - }; - -}} // namespace boost::type_deduction_detail - -#define BOOST_RESULT_OF_COMMON(expr, name, Y, SYMMETRY) \ - struct name \ - { \ - typedef type_deduction_detail::base_result_of base_type; \ - static typename base_type::x_type x; \ - static typename base_type::y_type y; \ - \ - BOOST_STATIC_CONSTANT(int, \ - size = sizeof( \ - type_deduction_detail::test< \ - typename base_type::x_type \ - , SYMMETRY \ - >(expr) \ - )); \ - \ - BOOST_STATIC_CONSTANT(int, index = (size / sizeof(char)) - 1); \ - \ - typedef typename mpl::at_c< \ - typename base_type::types, index>::type id; \ - typedef typename id::type type; \ - }; - -#define BOOST_UNARY_RESULT_OF(expr, name) \ - template \ - BOOST_RESULT_OF_COMMON(expr, name, \ - type_deduction_detail::asymmetric, type_deduction_detail::asymmetric) - -#define BOOST_BINARY_RESULT_OF(expr, name) \ - template \ - BOOST_RESULT_OF_COMMON(expr, name, Y, typename base_type::y_type) - -#define BOOST_ASYMMETRIC_BINARY_RESULT_OF(expr, name) \ - template \ - BOOST_RESULT_OF_COMMON(expr, name, Y, type_deduction_detail::asymmetric) - -#endif diff --git a/include/boost/spirit/home/phoenix/function.hpp b/include/boost/spirit/home/phoenix/function.hpp deleted file mode 100644 index 5309d9af3..000000000 --- a/include/boost/spirit/home/phoenix/function.hpp +++ /dev/null @@ -1,13 +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_FUNCTION_HPP -#define PHOENIX_FUNCTION_HPP - -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/function/detail/function_call.hpp b/include/boost/spirit/home/phoenix/function/detail/function_call.hpp deleted file mode 100644 index 622f118a1..000000000 --- a/include/boost/spirit/home/phoenix/function/detail/function_call.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 BOOST_PP_IS_ITERATING -#ifndef PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP -#define PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP - -#include -#include -#include - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ - "boost/spirit/home/phoenix/function/detail/function_call.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template - actor, F - , BOOST_PP_ENUM_PARAMS(N, A)>::type> - operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) const - { - return compose >(f, BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/function/function.hpp b/include/boost/spirit/home/phoenix/function/function.hpp deleted file mode 100644 index e33d02d6f..000000000 --- a/include/boost/spirit/home/phoenix/function/function.hpp +++ /dev/null @@ -1,48 +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_FUNCTION_FUNCTION_HPP -#define PHOENIX_FUNCTION_FUNCTION_HPP - -#include -#include - -namespace boost { namespace phoenix -{ - template - struct function - { - function() : f() {} - function(F const& f_) : f(f_) {} - - actor, F>::type> - operator()() const - { - return compose >(f); - } - - template - actor, F, A0>::type> - operator()(A0 const& _0) const - { - return compose >(f, _0); - } - - template - actor, F, A0, A1>::type> - operator()(A0 const& _0, A1 const& _1) const - { - return compose >(f, _0, _1); - } - - // Bring in the rest of the function call operators - #include - - F f; - }; -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/fusion.hpp b/include/boost/spirit/home/phoenix/fusion.hpp deleted file mode 100644 index 2d0d69967..000000000 --- a/include/boost/spirit/home/phoenix/fusion.hpp +++ /dev/null @@ -1,12 +0,0 @@ -/*============================================================================= - Copyright (c) 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_FUSION_HPP -#define PHOENIX_FUSION_HPP - -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/fusion/at.hpp b/include/boost/spirit/home/phoenix/fusion/at.hpp deleted file mode 100644 index 579658d19..000000000 --- a/include/boost/spirit/home/phoenix/fusion/at.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2008 Hartmut Kaiser - Copyright (c) 2005-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_SEQUENCE_AT_HPP -#define PHOENIX_SEQUENCE_AT_HPP - -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - template - struct at_eval - { - template - struct result - { - typedef typename Tuple::template result::type tuple; - typedef typename - fusion::result_of::at_c< - typename remove_reference::type, N - >::type - type; - }; - - template - static RT - eval(Env const& env, Tuple const& t) - { - return fusion::at_c(t.eval(env)); - } - }; - - template - inline actor, Tuple>::type> - at_c(Tuple const& tup) - { - return compose >(tup); - } - -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/object.hpp b/include/boost/spirit/home/phoenix/object.hpp deleted file mode 100644 index 5eecb96f9..000000000 --- a/include/boost/spirit/home/phoenix/object.hpp +++ /dev/null @@ -1,19 +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_OBJECT_HPP -#define PHOENIX_OBJECT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/object/const_cast.hpp b/include/boost/spirit/home/phoenix/object/const_cast.hpp deleted file mode 100644 index 77f24999c..000000000 --- a/include/boost/spirit/home/phoenix/object/const_cast.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_OBJECT_CONST_CAST_HPP -#define PHOENIX_OBJECT_CONST_CAST_HPP - -#include - -namespace boost { namespace phoenix -{ - namespace impl - { - template - struct const_cast_eval - { - template - struct result - { - typedef T type; - }; - - template - static RT - eval(Env const& env, U& obj) - { - return const_cast(obj.eval(env)); - } - }; - } - - template - inline actor, U>::type> - const_cast_(U const& obj) - { - return compose >(obj); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/object/construct.hpp b/include/boost/spirit/home/phoenix/object/construct.hpp deleted file mode 100644 index ec743b5df..000000000 --- a/include/boost/spirit/home/phoenix/object/construct.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_OBJECT_CONSTRUCT_HPP -#define PHOENIX_OBJECT_CONSTRUCT_HPP - -#include -#include - -namespace boost { namespace phoenix -{ - namespace detail - { - template - struct construct_eval - { - template - struct result - { - typedef T type; - }; - - template - static RT - eval(Env const& /*env*/) - { - return RT(); - } - - template - static RT - eval(Env const& env, A0& _0) - { - return RT(_0.eval(env)); - } - - template - static RT - eval(Env const& env, A0& _0, A1& _1) - { - return RT(_0.eval(env), _1.eval(env)); - } - - // Bring in the rest of the evals - #include - }; - } - - template - inline actor >::type> - construct() - { - return compose >(); - } - - template - inline actor, A0>::type> - construct(A0 const& _0) - { - return compose >(_0); - } - - template - inline actor, A0, A1>::type> - construct(A0 const& _0, A1 const& _1) - { - return compose >(_0, _1); - } - - // Bring in the rest of the new_ functions - #include -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/object/delete.hpp b/include/boost/spirit/home/phoenix/object/delete.hpp deleted file mode 100644 index 1b2328ca6..000000000 --- a/include/boost/spirit/home/phoenix/object/delete.hpp +++ /dev/null @@ -1,41 +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_OBJECT_DELETE_HPP -#define PHOENIX_OBJECT_DELETE_HPP - -#include - -namespace boost { namespace phoenix -{ - namespace impl - { - struct delete_eval - { - template - struct result - { - typedef void type; - }; - - template - static void - eval(Env const& env, P& p) - { - delete p.eval(env); - } - }; - } - - template - inline actor::type> - delete_(P const& p) - { - return compose(p); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/object/detail/construct.hpp b/include/boost/spirit/home/phoenix/object/detail/construct.hpp deleted file mode 100644 index d474f960f..000000000 --- a/include/boost/spirit/home/phoenix/object/detail/construct.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 BOOST_PP_IS_ITERATING -#ifndef PHOENIX_OBJECT_DETAIL_CONSTRUCT_HPP -#define PHOENIX_OBJECT_DETAIL_CONSTRUCT_HPP - -#include -#include -#include - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/object/detail/construct.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template - inline actor - , BOOST_PP_ENUM_PARAMS(N, A)>::type> - construct(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) - { - return compose >(BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/object/detail/construct_eval.hpp b/include/boost/spirit/home/phoenix/object/detail/construct_eval.hpp deleted file mode 100644 index aad710f23..000000000 --- a/include/boost/spirit/home/phoenix/object/detail/construct_eval.hpp +++ /dev/null @@ -1,46 +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_OBJECT_DETAIL_CONSTRUCT_EVAL_HPP -#define PHOENIX_OBJECT_DETAIL_CONSTRUCT_EVAL_HPP - -#include -#include -#include -#include - -#define PHOENIX_EVAL_ARG(z, n, data) \ - BOOST_PP_CAT(_, n).eval(env) - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/object/detail/construct_eval.hpp")) -#include BOOST_PP_ITERATE() - -#undef PHOENIX_EVAL_ARG -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template - static RT - eval(Env const& env, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) - { - return RT(BOOST_PP_ENUM(N, PHOENIX_EVAL_ARG, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/object/detail/new.hpp b/include/boost/spirit/home/phoenix/object/detail/new.hpp deleted file mode 100644 index 7767c718d..000000000 --- a/include/boost/spirit/home/phoenix/object/detail/new.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 BOOST_PP_IS_ITERATING -#ifndef PHOENIX_OBJECT_DETAIL_NEW_HPP -#define PHOENIX_OBJECT_DETAIL_NEW_HPP - -#include -#include -#include - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/object/detail/new.hpp")) -#include BOOST_PP_ITERATE() - -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template - inline actor - , BOOST_PP_ENUM_PARAMS(N, A)>::type> - new_(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) - { - return compose >(BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/object/detail/new_eval.hpp b/include/boost/spirit/home/phoenix/object/detail/new_eval.hpp deleted file mode 100644 index dbaa79191..000000000 --- a/include/boost/spirit/home/phoenix/object/detail/new_eval.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_OBJECT_DETAIL_NEW_EVAL_HPP -#define PHOENIX_OBJECT_DETAIL_NEW_EVAL_HPP - -#include -#include -#include -#include -#include - -#define PHOENIX_EVAL_ARG(z, n, data) \ - BOOST_PP_CAT(_, n).eval(env) - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_COMPOSITE_LIMIT, \ - "boost/spirit/home/phoenix/object/detail/new_eval.hpp")) -#include BOOST_PP_ITERATE() - -#undef PHOENIX_EVAL_ARG -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template - static RT - eval(Env const& env, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) - { - return new T(BOOST_PP_ENUM(N, PHOENIX_EVAL_ARG, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/object/dynamic_cast.hpp b/include/boost/spirit/home/phoenix/object/dynamic_cast.hpp deleted file mode 100644 index 02b7c2293..000000000 --- a/include/boost/spirit/home/phoenix/object/dynamic_cast.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_OBJECT_DYNAMIC_CAST_HPP -#define PHOENIX_OBJECT_DYNAMIC_CAST_HPP - -#include - -namespace boost { namespace phoenix -{ - namespace impl - { - template - struct dynamic_cast_eval - { - template - struct result - { - typedef T type; - }; - - template - static RT - eval(Env const& env, U& obj) - { - return dynamic_cast(obj.eval(env)); - } - }; - } - - template - inline actor, U>::type> - dynamic_cast_(U const& obj) - { - return compose >(obj); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/object/new.hpp b/include/boost/spirit/home/phoenix/object/new.hpp deleted file mode 100644 index 58bb64dfc..000000000 --- a/include/boost/spirit/home/phoenix/object/new.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_OBJECT_NEW_HPP -#define PHOENIX_OBJECT_NEW_HPP - -#include -#include - -namespace boost { namespace phoenix -{ - namespace detail - { - template - struct new_eval - { - template - struct result - { - typedef T* type; - }; - - template - static RT - eval(Env const& /*env*/) - { - return new T; - } - - template - static RT - eval(Env const& env, A0& _0) - { - return new T(_0.eval(env)); - } - - template - static RT - eval(Env const& env, A0& _0, A1& _1) - { - return new T(_0.eval(env), _1.eval(env)); - } - - // Bring in the rest of the evals - #include - }; - } - - template - inline actor >::type> - new_() - { - return compose >(); - } - - template - inline actor, A0>::type> - new_(A0 const& _0) - { - return compose >(_0); - } - - template - inline actor, A0, A1>::type> - new_(A0 const& _0, A1 const& _1) - { - return compose >(_0, _1); - } - - // Bring in the rest of the new_ functions - #include -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/object/reinterpret_cast.hpp b/include/boost/spirit/home/phoenix/object/reinterpret_cast.hpp deleted file mode 100644 index 9e255d820..000000000 --- a/include/boost/spirit/home/phoenix/object/reinterpret_cast.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_OBJECT_REINTERPRET_CAST_HPP -#define PHOENIX_OBJECT_REINTERPRET_CAST_HPP - -#include - -namespace boost { namespace phoenix -{ - namespace impl - { - template - struct reinterpret_cast_eval - { - template - struct result - { - typedef T type; - }; - - template - static RT - eval(Env const& env, U& obj) - { - return reinterpret_cast(obj.eval(env)); - } - }; - } - - template - inline actor, U>::type> - reinterpret_cast_(U const& obj) - { - return compose >(obj); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/object/static_cast.hpp b/include/boost/spirit/home/phoenix/object/static_cast.hpp deleted file mode 100644 index 508d1b077..000000000 --- a/include/boost/spirit/home/phoenix/object/static_cast.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_OBJECT_STATIC_CAST_HPP -#define PHOENIX_OBJECT_STATIC_CAST_HPP - -#include - -namespace boost { namespace phoenix -{ - namespace impl - { - template - struct static_cast_eval - { - template - struct result - { - typedef T type; - }; - - template - static RT - eval(Env const& env, U& obj) - { - return static_cast(obj.eval(env)); - } - }; - } - - template - inline actor, U>::type> - static_cast_(U const& obj) - { - return compose >(obj); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/operator.hpp b/include/boost/spirit/home/phoenix/operator.hpp deleted file mode 100644 index 2d8ee6c5c..000000000 --- a/include/boost/spirit/home/phoenix/operator.hpp +++ /dev/null @@ -1,20 +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_OPERATOR_HPP -#define PHOENIX_OPERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/arithmetic.hpp b/include/boost/spirit/home/phoenix/operator/arithmetic.hpp deleted file mode 100644 index e51b23e14..000000000 --- a/include/boost/spirit/home/phoenix/operator/arithmetic.hpp +++ /dev/null @@ -1,115 +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_OPERATOR_ARITHMETIC_HPP -#define PHOENIX_OPERATOR_ARITHMETIC_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - struct negate_eval; - struct posit_eval; - struct pre_increment_eval; - struct pre_decrement_eval; - struct post_increment_eval; - struct post_decrement_eval; - - struct plus_assign_eval; - struct minus_assign_eval; - struct multiplies_assign_eval; - struct divides_assign_eval; - struct modulus_assign_eval; - - struct plus_eval; - struct minus_eval; - struct multiplies_eval; - struct divides_eval; - struct modulus_eval; - - BOOST_UNARY_RESULT_OF(-x, result_of_negate) - BOOST_UNARY_RESULT_OF(+x, result_of_posit) - BOOST_UNARY_RESULT_OF(++x, result_of_pre_increment) - BOOST_UNARY_RESULT_OF(--x, result_of_pre_decrement) - BOOST_UNARY_RESULT_OF(x++, result_of_post_increment) - BOOST_UNARY_RESULT_OF(x--, result_of_post_decrement) - - BOOST_BINARY_RESULT_OF(x += y, result_of_plus_assign) - BOOST_BINARY_RESULT_OF(x -= y, result_of_minus_assign) - BOOST_BINARY_RESULT_OF(x *= y, result_of_multiplies_assign) - BOOST_BINARY_RESULT_OF(x /= y, result_of_divides_assign) - BOOST_BINARY_RESULT_OF(x %= y, result_of_modulus_assign) - - BOOST_BINARY_RESULT_OF(x + y, result_of_plus) - BOOST_BINARY_RESULT_OF(x - y, result_of_minus) - BOOST_BINARY_RESULT_OF(x * y, result_of_multiplies) - BOOST_BINARY_RESULT_OF(x / y, result_of_divides) - BOOST_BINARY_RESULT_OF(x % y, result_of_modulus) - -#define x a0.eval(env) -#define y a1.eval(env) - - PHOENIX_UNARY_EVAL(negate_eval, result_of_negate, -x) - PHOENIX_UNARY_EVAL(posit_eval, result_of_posit, +x) - PHOENIX_UNARY_EVAL(pre_increment_eval, result_of_pre_increment, ++x) - PHOENIX_UNARY_EVAL(pre_decrement_eval, result_of_pre_decrement, --x) - PHOENIX_UNARY_EVAL(post_increment_eval, result_of_post_increment, x++) - PHOENIX_UNARY_EVAL(post_decrement_eval, result_of_post_decrement, x--) - - PHOENIX_BINARY_EVAL(plus_assign_eval, result_of_plus_assign, x += y) - PHOENIX_BINARY_EVAL(minus_assign_eval, result_of_minus_assign, x -= y) - PHOENIX_BINARY_EVAL(multiplies_assign_eval, result_of_multiplies_assign, x *= y) - PHOENIX_BINARY_EVAL(divides_assign_eval, result_of_divides_assign, x /= y) - PHOENIX_BINARY_EVAL(modulus_assign_eval, result_of_modulus_assign, x %= y) - - PHOENIX_BINARY_EVAL(plus_eval, result_of_plus, x + y) - PHOENIX_BINARY_EVAL(minus_eval, result_of_minus, x - y) - PHOENIX_BINARY_EVAL(multiplies_eval, result_of_multiplies, x * y) - PHOENIX_BINARY_EVAL(divides_eval, result_of_divides, x / y) - PHOENIX_BINARY_EVAL(modulus_eval, result_of_modulus, x % y) - - PHOENIX_UNARY_COMPOSE(negate_eval, -) - PHOENIX_UNARY_COMPOSE(posit_eval, +) - PHOENIX_UNARY_COMPOSE(pre_increment_eval, ++) - PHOENIX_UNARY_COMPOSE(pre_decrement_eval, --) - - template - inline actor >::type> - operator++(actor const& a0, int) // special case - { - return compose(a0); - } - - template - inline actor >::type> - operator--(actor const& a0, int) // special case - { - return compose(a0); - } - - PHOENIX_BINARY_COMPOSE(plus_assign_eval, +=) - PHOENIX_BINARY_COMPOSE(minus_assign_eval, -=) - PHOENIX_BINARY_COMPOSE(multiplies_assign_eval, *=) - PHOENIX_BINARY_COMPOSE(divides_assign_eval, /=) - PHOENIX_BINARY_COMPOSE(modulus_assign_eval, %=) - - PHOENIX_BINARY_COMPOSE(plus_eval, +) - PHOENIX_BINARY_COMPOSE(minus_eval, -) - PHOENIX_BINARY_COMPOSE(multiplies_eval, *) - PHOENIX_BINARY_COMPOSE(divides_eval, /) - PHOENIX_BINARY_COMPOSE(modulus_eval, %) - -#undef x -#undef y -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/bitwise.hpp b/include/boost/spirit/home/phoenix/operator/bitwise.hpp deleted file mode 100644 index 0450db46e..000000000 --- a/include/boost/spirit/home/phoenix/operator/bitwise.hpp +++ /dev/null @@ -1,91 +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_OPERATOR_BITWISE_HPP -#define PHOENIX_OPERATOR_BITWISE_HPP - -#include -#include -#include -#include -#include -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4800) -#endif - -namespace boost { namespace phoenix -{ - struct invert_eval; - - struct and_assign_eval; - struct or_assign_eval; - struct xor_assign_eval; - struct shift_left_assign_eval; - struct shift_right_assign_eval; - - struct and_eval; - struct or_eval; - struct xor_eval; - struct shift_left_eval; - struct shift_right_eval; - - BOOST_UNARY_RESULT_OF(~x, result_of_invert) - - BOOST_BINARY_RESULT_OF(x &= y, result_of_and_assign) - BOOST_BINARY_RESULT_OF(x |= y, result_of_or_assign) - BOOST_BINARY_RESULT_OF(x ^= y, result_of_xor_assign) - BOOST_BINARY_RESULT_OF(x <<= y, result_of_shift_left_assign) - BOOST_BINARY_RESULT_OF(x >>= y, result_of_shift_right_assign) - - BOOST_BINARY_RESULT_OF(x & y, result_of_and) - BOOST_BINARY_RESULT_OF(x | y, result_of_or) - BOOST_BINARY_RESULT_OF(x ^ y, result_of_xor) - BOOST_BINARY_RESULT_OF(x << y, result_of_shift_left) - BOOST_BINARY_RESULT_OF(x >> y, result_of_shift_right) - -#define x a0.eval(env) -#define y a1.eval(env) - - PHOENIX_UNARY_EVAL(invert_eval, result_of_invert, ~x) - PHOENIX_UNARY_COMPOSE(invert_eval, ~) - - PHOENIX_BINARY_EVAL(and_assign_eval, result_of_and_assign, x &= y) - PHOENIX_BINARY_EVAL(or_assign_eval, result_of_or_assign, x |= y) - PHOENIX_BINARY_EVAL(xor_assign_eval, result_of_xor_assign, x ^= y) - PHOENIX_BINARY_EVAL(shift_left_assign_eval, result_of_shift_left_assign, x <<= y) - PHOENIX_BINARY_EVAL(shift_right_assign_eval, result_of_shift_right_assign, x >>= y) - - PHOENIX_BINARY_EVAL(and_eval, result_of_and, x & y) - PHOENIX_BINARY_EVAL(or_eval, result_of_or, x | y) - PHOENIX_BINARY_EVAL(xor_eval, result_of_xor, x ^ y) - PHOENIX_BINARY_EVAL(shift_left_eval, result_of_shift_left, x << y) - PHOENIX_BINARY_EVAL(shift_right_eval, result_of_shift_right, x >> y) - - PHOENIX_BINARY_COMPOSE(and_assign_eval, &=) - PHOENIX_BINARY_COMPOSE(or_assign_eval, |=) - PHOENIX_BINARY_COMPOSE(xor_assign_eval, ^=) - PHOENIX_BINARY_COMPOSE(shift_left_assign_eval, <<=) - PHOENIX_BINARY_COMPOSE(shift_right_assign_eval, >>=) - - PHOENIX_BINARY_COMPOSE(and_eval, &) - PHOENIX_BINARY_COMPOSE(or_eval, |) - PHOENIX_BINARY_COMPOSE(xor_eval, ^) - PHOENIX_BINARY_COMPOSE(shift_left_eval, <<) - PHOENIX_BINARY_COMPOSE(shift_right_eval, >>) - -#undef x -#undef y -}} - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/comparison.hpp b/include/boost/spirit/home/phoenix/operator/comparison.hpp deleted file mode 100644 index fe9298c83..000000000 --- a/include/boost/spirit/home/phoenix/operator/comparison.hpp +++ /dev/null @@ -1,55 +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_OPERATOR_COMPARISON_HPP -#define PHOENIX_OPERATOR_COMPARISON_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - struct equal_to_eval; - struct not_equal_to_eval; - struct less_eval; - struct less_equal_eval; - struct greater_eval; - struct greater_equal_eval; - - BOOST_BINARY_RESULT_OF(x == y, result_of_equal_to) - BOOST_BINARY_RESULT_OF(x != y, result_of_not_equal_to) - BOOST_BINARY_RESULT_OF(x < y, result_of_less) - BOOST_BINARY_RESULT_OF(x <= y, result_of_less_equal) - BOOST_BINARY_RESULT_OF(x > y, result_of_greater) - BOOST_BINARY_RESULT_OF(x >= y, result_of_greater_equal) - -#define x a0.eval(env) -#define y a1.eval(env) - - PHOENIX_BINARY_EVAL(equal_to_eval, result_of_equal_to, x == y) - PHOENIX_BINARY_EVAL(not_equal_to_eval, result_of_not_equal_to, x != y) - PHOENIX_BINARY_EVAL(less_eval, result_of_less, x < y) - PHOENIX_BINARY_EVAL(less_equal_eval, result_of_less_equal, x <= y) - PHOENIX_BINARY_EVAL(greater_eval, result_of_greater, x > y) - PHOENIX_BINARY_EVAL(greater_equal_eval, result_of_greater_equal, x >= y) - - PHOENIX_BINARY_COMPOSE(equal_to_eval, ==) - PHOENIX_BINARY_COMPOSE(not_equal_to_eval, !=) - PHOENIX_BINARY_COMPOSE(less_eval, <) - PHOENIX_BINARY_COMPOSE(less_equal_eval, <=) - PHOENIX_BINARY_COMPOSE(greater_eval, >) - PHOENIX_BINARY_COMPOSE(greater_equal_eval, >=) - -#undef x -#undef y -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp b/include/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp deleted file mode 100644 index 49335fda7..000000000 --- a/include/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp +++ /dev/null @@ -1,32 +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_OPERATOR_DETAIL_BINARY_COMPOSE_HPP -#define PHOENIX_OPERATOR_DETAIL_BINARY_COMPOSE_HPP - -#define PHOENIX_BINARY_COMPOSE(eval_name, op) \ - template \ - inline actor, actor >::type> \ - operator op (actor const& a0, actor const& a1) \ - { \ - return compose(a0, a1); \ - } \ - \ - template \ - inline actor, T1>::type> \ - operator op (actor const& a0, T1 const& a1) \ - { \ - return compose(a0, a1); \ - } \ - \ - template \ - inline actor >::type> \ - operator op (T0 const& a0, actor const& a1) \ - { \ - return compose(a0, a1); \ - } - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp b/include/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp deleted file mode 100644 index 178988248..000000000 --- a/include/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp +++ /dev/null @@ -1,44 +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_OPERATOR_DETAIL_BINARY_EVAL_HPP -#define PHOENIX_OPERATOR_DETAIL_BINARY_EVAL_HPP - -#include -#include -#include -#include -#include - -#define PHOENIX_BINARY_EVAL(eval_name, op_result, expr) \ - struct eval_name \ - { \ - template \ - struct result \ - { \ - typedef typename A0::template result::type x_type; \ - typedef typename A1::template result::type y_type; \ - \ - typedef typename \ - mpl::eval_if< \ - mpl::or_, is_actor > \ - , re_curry \ - , op_result \ - >::type \ - type; \ - }; \ - \ - template \ - static RT \ - eval(Env const& env, A0& a0, A1& a1) \ - { \ - return expr; \ - } \ - }; - -#undef x -#undef y -#endif diff --git a/include/boost/spirit/home/phoenix/operator/detail/io.hpp b/include/boost/spirit/home/phoenix/operator/detail/io.hpp deleted file mode 100644 index d82a153c3..000000000 --- a/include/boost/spirit/home/phoenix/operator/detail/io.hpp +++ /dev/null @@ -1,78 +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_OPERATOR_DETAIL_IO_HPP -#define PHOENIX_OPERATOR_DETAIL_IO_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix { namespace detail -{ - typedef char(&no)[1]; - typedef char(&yes)[2]; - - template - yes ostream_test(std::basic_ostream*); - no ostream_test(...); - - template - yes istream_test(std::basic_istream*); - no istream_test(...); - - template - struct is_ostream - { - static T x; - BOOST_STATIC_CONSTANT(bool, - value = sizeof(detail::ostream_test(boost::addressof(x))) == sizeof(yes)); - }; - - template - struct is_istream - { - static T x; - BOOST_STATIC_CONSTANT(bool, - value = sizeof(detail::istream_test(boost::addressof(x))) == sizeof(yes)); - }; - - template - struct enable_if_ostream : - enable_if< - detail::is_ostream - , actor< - typename as_composite< - shift_left_eval - , actor > - , actor - >::type - > - > - {}; - - template - struct enable_if_istream : - enable_if< - detail::is_istream - , actor< - typename as_composite< - shift_right_eval - , actor > - , actor - >::type - > - > - {}; - - typedef std::ios_base& (*iomanip_type)(std::ios_base&); - typedef std::istream& (*imanip_type)(std::istream&); - typedef std::ostream& (*omanip_type)(std::ostream&); -}}} - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp b/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp deleted file mode 100644 index cb77613ae..000000000 --- a/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_OPERATOR_DETAIL_MEM_FUN_PTR_EVAL_HPP -#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_EVAL_HPP - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include - -#include - -namespace boost { namespace phoenix { - - struct mem_fun_ptr_eval - { - template - - struct result - : detail::mem_fun_ptr_return::type> { }; - - template - static typename result::type - eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor) - { - return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(); - } - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_MEMBER_LIMIT)), "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp")) - -#include BOOST_PP_ITERATE() - - }; -}} - -#endif - -#else - -#define PHOENIX_ITERATION BOOST_PP_ITERATION() - -#define PHOENIX_EVAL_ARG(z,n,_) arg ## n.eval(env) - - template - static typename result::type - eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor, - BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, Arg, & arg)) - { - return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))( - BOOST_PP_ENUM(PHOENIX_ITERATION,PHOENIX_EVAL_ARG,_)); - } - -#undef PHOENIX_EVAL_ARG -#undef PHOENIX_ITERATION - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp b/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp deleted file mode 100644 index 31d541303..000000000 --- a/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp +++ /dev/null @@ -1,69 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_OPERATOR_DETAIL_MEM_FUN_PTR_GEN_HPP -#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_GEN_HPP - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -namespace boost { namespace phoenix { - template - struct mem_fun_ptr_gen - { - mem_fun_ptr_gen( - const Actor& actor, MemFunPtr memFunPtr) - : mActor(actor), mMemFunPtr(memFunPtr) { } - - actor::type>::type> - operator()() const - { - return compose( - mActor, as_actor::convert(mMemFunPtr)); - } - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_MEMBER_LIMIT)), "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp")) - -#include BOOST_PP_ITERATE() - - Actor mActor; - MemFunPtr mMemFunPtr; - }; -}} - -#endif -#else - -#define PHOENIX_ITERATION BOOST_PP_ITERATION() - - template - actor::type, - BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, Arg)>::type> - operator()( - BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, const Arg, &arg)) const - { - return compose( - mActor, as_actor::convert(mMemFunPtr), - BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, arg)); - } - -#undef PHOENIX_ITERATION - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp b/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp deleted file mode 100644 index 102f17f02..000000000 --- a/include/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP -#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP - -#include - -#include -#include - -namespace boost { namespace phoenix { -namespace detail -{ - template - struct mem_fun_ptr_return; - - template - struct mem_fun_ptr_return - { - typedef Ret type; - }; - - template - struct mem_fun_ptr_return - { - typedef Ret type; - }; - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, PHOENIX_MEMBER_LIMIT, "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp")) - -#include BOOST_PP_ITERATE() - -} -}} - -#endif - -#else - -#define PHOENIX_ITERATION BOOST_PP_ITERATION() - - template - struct mem_fun_ptr_return - { - typedef Ret type; - }; - - template - struct mem_fun_ptr_return - { - typedef Ret type; - }; - -#undef PHOENIX_ITERATION - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp b/include/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp deleted file mode 100644 index fd9a8c70f..000000000 --- a/include/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp +++ /dev/null @@ -1,18 +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_OPERATOR_DETAIL_UNARY_COMPOSE_HPP -#define PHOENIX_OPERATOR_DETAIL_UNARY_COMPOSE_HPP - -#define PHOENIX_UNARY_COMPOSE(eval_name, op) \ - template \ - inline actor >::type> \ - operator op (actor const& a0) \ - { \ - return compose(a0); \ - } - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp b/include/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp deleted file mode 100644 index 501f6df71..000000000 --- a/include/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp +++ /dev/null @@ -1,40 +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_OPERATOR_DETAIL_UNARY_EVAL_HPP -#define PHOENIX_OPERATOR_DETAIL_UNARY_EVAL_HPP - -#include -#include - -#define PHOENIX_UNARY_EVAL(eval_name, op_result, expr) \ - struct eval_name \ - { \ - template \ - struct result \ - { \ - typedef typename A0::template result::type x_type; \ - \ - typedef typename \ - mpl::eval_if< \ - is_actor \ - , re_curry \ - , op_result \ - >::type \ - type; \ - }; \ - \ - template \ - static RT \ - eval(Env const& env, A0& a0) \ - { \ - return expr; \ - } \ - }; - -#endif - - diff --git a/include/boost/spirit/home/phoenix/operator/if_else.hpp b/include/boost/spirit/home/phoenix/operator/if_else.hpp deleted file mode 100644 index 8492e9086..000000000 --- a/include/boost/spirit/home/phoenix/operator/if_else.hpp +++ /dev/null @@ -1,78 +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_OPERATOR_IF_ELSE_HPP -#define PHOENIX_OPERATOR_IF_ELSE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - BOOST_BINARY_RESULT_OF(true ? x : y, result_of_if_else) - - struct if_else_op_eval - { - template < - typename Env - , typename Cond - , typename Then - , typename Else - > - struct result - { - typedef typename Then::template result::type then_type; - typedef typename Else::template result::type else_type; - - typedef typename - result_of_if_else::type - ite_result; - - // Note: c ? x : y can return an lvalue! Allow if_else_op_eval - // to return an lvalue IFF then_type and else_type are both lvalues - // with the same type. - - typedef typename - mpl::if_< - mpl::and_< - is_same - , is_reference - > - , ite_result - , typename remove_reference::type - >::type - type; - }; - - template < - typename RT - , typename Env - , typename Cond - , typename Then - , typename Else - > - static RT - eval(Env const& env, Cond& cond, Then& then, Else& else_) - { - return cond.eval(env) ? then.eval(env) : else_.eval(env); - } - }; - - template - inline actor::type> - if_else(Cond const& cond, Then const& then, Else const& else_) - { - return compose(cond, then, else_); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/io.hpp b/include/boost/spirit/home/phoenix/operator/io.hpp deleted file mode 100644 index 360a46fbc..000000000 --- a/include/boost/spirit/home/phoenix/operator/io.hpp +++ /dev/null @@ -1,86 +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_OPERATOR_IO_HPP -#define PHOENIX_OPERATOR_IO_HPP - -#include - -namespace boost { namespace phoenix -{ -/////////////////////////////////////////////////////////////////////////////// -// -// overloads for std::basic_ostream and std::basic_istream -// -/////////////////////////////////////////////////////////////////////////////// - template - inline typename detail::enable_if_ostream::type - operator<<(T0& a0, actor const& a1) - { - return compose(phoenix::ref(a0), a1); - } - - template - inline typename detail::enable_if_istream::type - operator>>(T0& a0, actor const& a1) - { - return compose(phoenix::ref(a0), a1); - } - - // resolve ambiguities with fusion. - template - inline typename detail::enable_if_ostream::type - operator<<(std::ostream& a0, actor const& a1) - { - return compose(phoenix::ref(a0), a1); - } - - template - inline typename detail::enable_if_istream::type - operator>>(std::istream& a0, actor const& a1) - { - return compose(phoenix::ref(a0), a1); - } - -/////////////////////////////////////////////////////////////////////////////// -// -// overloads for I/O manipulators. -// -/////////////////////////////////////////////////////////////////////////////// - template - inline actor, detail::omanip_type>::type> - operator<<(actor const& a0, detail::omanip_type a1) - { - return compose(a0, a1); - } - - template - inline actor, detail::iomanip_type>::type> - operator<<(actor const& a0, detail::iomanip_type a1) - { - return compose(a0, a1); - } - - template - inline actor, detail::imanip_type>::type> - operator>>(actor const& a0, detail::imanip_type a1) - { - return compose(a0, a1); - } - - template - inline actor, detail::iomanip_type>::type> - operator>>(actor const& a0, detail::iomanip_type a1) - { - return compose(a0, a1); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/logical.hpp b/include/boost/spirit/home/phoenix/operator/logical.hpp deleted file mode 100644 index 84619aa46..000000000 --- a/include/boost/spirit/home/phoenix/operator/logical.hpp +++ /dev/null @@ -1,43 +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_OPERATOR_LOGICAL_HPP -#define PHOENIX_OPERATOR_LOGICAL_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - struct logical_not_eval; - struct logical_and_eval; - struct logical_or_eval; - - BOOST_UNARY_RESULT_OF(!x, result_of_logical_not) - BOOST_BINARY_RESULT_OF(x && y, result_of_logical_and) - BOOST_BINARY_RESULT_OF(x || y, result_of_logical_or) - -#define x a0.eval(env) -#define y a1.eval(env) - - PHOENIX_UNARY_EVAL(logical_not_eval, result_of_logical_not, !x) - PHOENIX_BINARY_EVAL(logical_and_eval, result_of_logical_and, x && y) - PHOENIX_BINARY_EVAL(logical_or_eval, result_of_logical_or, x || y) - - PHOENIX_UNARY_COMPOSE(logical_not_eval, !) - PHOENIX_BINARY_COMPOSE(logical_and_eval, &&) - PHOENIX_BINARY_COMPOSE(logical_or_eval, ||) - -#undef x -#undef y -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/member.hpp b/include/boost/spirit/home/phoenix/operator/member.hpp deleted file mode 100644 index 27f3e8d1a..000000000 --- a/include/boost/spirit/home/phoenix/operator/member.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_OPERATOR_MEMBER_HPP -#define PHOENIX_OPERATOR_MEMBER_HPP - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#include - -#include - -namespace boost { - template class shared_ptr; - template class scoped_ptr; - -namespace phoenix { - namespace detail - { - template - struct member_type; - - template - struct member_type - { - typedef MemberType type; - }; - } - - namespace meta - { - template - struct pointed_type; - - template - struct pointed_type - { - typedef T type; - }; - - template - struct pointed_type > - { - typedef T type; - }; - - template - struct pointed_type > - { - typedef T type; - }; - - template - struct pointed_type > - { - typedef T type; - }; - } - - struct member_object_eval - { - template - struct result - { - typedef typename detail::member_type< - typename eval_result::type>::type member_type; - - typedef typename meta::pointed_type< - typename remove_reference< - typename eval_result::type>::type>::type object_type; - - typedef typename add_reference< - typename mpl::eval_if< - is_const, - add_const, - mpl::identity >::type>::type type; - }; - - template - static typename result::type - eval(const Env& env, PtrActor& ptrActor, MemPtrActor& memPtrActor) - { - return get_pointer(ptrActor.eval(env))->*memPtrActor.eval(env); - } - }; - - namespace member_object - { - template - typename enable_if< - mpl::and_, mpl::not_ > >, - actor, - typename as_actor::type>::type> >::type - operator->*( - const actor& ptrActor, - MemObjPtr memObjPtr) - { - return compose( - ptrActor, - as_actor::convert(memObjPtr)); - } - } - - namespace member_function - { - template - typename enable_if< - is_member_function_pointer, - mem_fun_ptr_gen, MemFunPtr> >::type - operator->*(const actor& ptrActor, MemFunPtr memFunPtr) - { - return mem_fun_ptr_gen, MemFunPtr>( - ptrActor, memFunPtr); - } - } - - using member_object::operator->*; - using member_function::operator->*; -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/operator/self.hpp b/include/boost/spirit/home/phoenix/operator/self.hpp deleted file mode 100644 index 294adf6b8..000000000 --- a/include/boost/spirit/home/phoenix/operator/self.hpp +++ /dev/null @@ -1,75 +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_OPERATOR_SELF_HPP -#define PHOENIX_OPERATOR_SELF_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - struct reference_eval; - struct dereference_eval; - struct assign_eval; - struct index_eval; - - BOOST_UNARY_RESULT_OF(&x, result_of_reference) - BOOST_UNARY_RESULT_OF(*x, result_of_dereference) - BOOST_BINARY_RESULT_OF(x = y, result_of_assign) - BOOST_ASYMMETRIC_BINARY_RESULT_OF(x[y], result_of_index) - - namespace detail - { - template - struct make_assign_composite - { - typedef actor::type> type; - }; - - template - struct make_index_composite - { - typedef actor::type> type; - }; - } - - template - template - typename detail::make_assign_composite, T1>::type - actor::operator=(T1 const& a1) const - { - return compose(*this, a1); - } - - template - template - typename detail::make_index_composite, T1>::type - actor::operator[](T1 const& a1) const - { - return compose(*this, a1); - } - -#define x a0.eval(env) -#define y a1.eval(env) - - PHOENIX_UNARY_EVAL(reference_eval, result_of_reference, &x) - PHOENIX_UNARY_EVAL(dereference_eval, result_of_dereference, *x) - PHOENIX_UNARY_COMPOSE(reference_eval, &) - PHOENIX_UNARY_COMPOSE(dereference_eval, *) - - PHOENIX_BINARY_EVAL(assign_eval, result_of_assign, x = y) - PHOENIX_BINARY_EVAL(index_eval, result_of_index, x[y]) -}} - -#undef x -#undef y -#endif diff --git a/include/boost/spirit/home/phoenix/scope.hpp b/include/boost/spirit/home/phoenix/scope.hpp deleted file mode 100644 index c1b9ae319..000000000 --- a/include/boost/spirit/home/phoenix/scope.hpp +++ /dev/null @@ -1,16 +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_SCOPE_HPP -#define PHOENIX_SCOPE_HPP - -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/scope/detail/local_gen.hpp b/include/boost/spirit/home/phoenix/scope/detail/local_gen.hpp deleted file mode 100644 index 6a74df6b1..000000000 --- a/include/boost/spirit/home/phoenix/scope/detail/local_gen.hpp +++ /dev/null @@ -1,57 +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 -// Allow multiple inclusion. let.hpp and lambda.hpp will have the guards - -#include -#include -#include - -#define PHOENIX_LOCAL_GEN_PARAM(z, n, data) \ - actor, V##n> > > const& a##n - -#define PHOENIX_LOCAL_GEN_ACTOR(z, n, data) \ - fusion::at_c<1>(a##n) - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, PHOENIX_LOCAL_LIMIT, \ - "boost/spirit/home/phoenix/scope/detail/local_gen.hpp")) -#include BOOST_PP_ITERATE() - -#undef PHOENIX_LOCAL_GEN_PARAM -#undef PHOENIX_LOCAL_GEN_ACTOR - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template < - BOOST_PP_ENUM_PARAMS(N, typename K) - , BOOST_PP_ENUM_PARAMS(N, typename V) - > - PHOENIX_LOCAL_GEN_NAME< - fusion::vector - , detail::map_local_index_to_tuple - > - operator()( - BOOST_PP_ENUM(N, PHOENIX_LOCAL_GEN_PARAM, _) - ) const - { - return fusion::vector( - BOOST_PP_ENUM(N, PHOENIX_LOCAL_GEN_ACTOR, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/scope/detail/local_variable.hpp b/include/boost/spirit/home/phoenix/scope/detail/local_variable.hpp deleted file mode 100644 index 1ad7932d8..000000000 --- a/include/boost/spirit/home/phoenix/scope/detail/local_variable.hpp +++ /dev/null @@ -1,198 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - Copyright (c) 2004 Daniel Wallin - - 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_SCOPE_DETAIL_LOCAL_VARIABLE_HPP -#define PHOENIX_SCOPE_DETAIL_LOCAL_VARIABLE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define PHOENIX_MAP_LOCAL_TEMPLATE_PARAM(z, n, data) \ - typename T##n = unused - -#define PHOENIX_MAP_LOCAL_DISPATCH(z, n, data) \ - typedef char(&result##n)[n+2]; \ - static result##n get(T##n*); - -namespace boost { namespace phoenix -{ - template - struct scoped_environment; - - namespace detail - { - template - struct initialize_local - { - template - struct result; - - template - struct result - { - typedef typename remove_reference::type actor_type; - typedef typename actor_type::template result::type type; - }; - - initialize_local(Env const& env) - : env(env) {} - - template - typename result::type - operator()(Actor const& actor) const - { - return actor.eval(env); - } - - Env const& env; - - private: - // silence MSVC warning C4512: assignment operator could not be generated - initialize_local& operator= (initialize_local const&); - }; - - template - struct is_scoped_environment : mpl::false_ {}; - - template - struct is_scoped_environment > - : mpl::true_ {}; - - template - struct unused; - - template - struct map_local_index_to_tuple - { - typedef char(¬_found)[1]; - static not_found get(...); - - BOOST_PP_REPEAT(PHOENIX_LOCAL_LIMIT, PHOENIX_MAP_LOCAL_DISPATCH, _) - }; - - template - T* generate_pointer(); - - template - struct get_index - { - BOOST_STATIC_CONSTANT(int, - value = ( - static_cast((sizeof(Map::get(generate_pointer()))) / sizeof(char)) - 2 - )); - - // if value == -1, Tag is not found - typedef mpl::int_ type; - }; - - template - struct apply_local; - - template - struct outer_local - { - typedef typename - apply_local::type - type; - }; - - template - struct get_local_or_void - { - typedef typename - mpl::eval_if< - mpl::less > - , fusion::result_of::at - , mpl::identity - >::type - type; - }; - - template - struct get_local_from_index - { - typedef typename - mpl::eval_if< - mpl::equal_to > - , outer_local - , get_local_or_void - >::type - type; - }; - - template - struct get_local - { - typedef typename - get_index< - typename Env::map_type, typename Local::key_type>::type - index_type; - - typedef typename - get_local_from_index::type - type; - }; - - template - struct apply_local - { - // $$$ TODO: static assert that Env is a scoped_environment $$$ - typedef typename get_local::type type; - }; - - template - struct eval_local - { - template - static RT - get(Env const& env, Index, mpl::false_) - { - return RT(fusion::at(env.locals)); - } - - template - static RT - get(Env const& env, Index index, mpl::true_) - { - typedef typename - get_index::type - index_type; - - return get( - env.outer_env - , index_type() - , mpl::equal_to >()); - } - - template - static RT - get(Env const& env, Index index) - { - return get( - env - , index - , mpl::equal_to >()); - } - }; - } -}} - -#undef PHOENIX_MAP_LOCAL_TEMPLATE_PARAM -#undef PHOENIX_MAP_LOCAL_DISPATCH -#endif diff --git a/include/boost/spirit/home/phoenix/scope/dynamic.hpp b/include/boost/spirit/home/phoenix/scope/dynamic.hpp deleted file mode 100644 index c822bf7d0..000000000 --- a/include/boost/spirit/home/phoenix/scope/dynamic.hpp +++ /dev/null @@ -1,193 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - Copyright (c) 2004 Daniel Wallin - - 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_SCOPE_DYNAMIC_HPP -#define PHOENIX_SCOPE_DYNAMIC_HPP - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define PHOENIX_DYNAMIC_MEMBER(z, n, data) \ - typedef actor > \ - BOOST_PP_CAT(member, BOOST_PP_INC(n)); - -namespace boost { namespace phoenix -{ - template - struct dynamic_frame : noncopyable - { - typedef typename DynamicScope::tuple_type tuple_type; - - dynamic_frame(DynamicScope const& scope) - : tuple() - , save(scope.frame) - , scope(scope) - { - scope.frame = this; - } - - template - dynamic_frame(DynamicScope const& scope, Tuple const& init) - : tuple(init) - , save(scope.frame) - , scope(scope) - { - scope.frame = this; - } - - ~dynamic_frame() - { - scope.frame = save; - } - - tuple_type& data() { return tuple; } - tuple_type const& data() const { return tuple; } - - private: - - tuple_type tuple; - dynamic_frame* save; - DynamicScope const& scope; - }; - - template - struct dynamic_member - { - typedef mpl::false_ no_nullary; - typedef typename DynamicScope::tuple_type tuple_type; - - dynamic_member(DynamicScope const& scope) - : scope(scope) {} - - template - struct result - { - typedef typename - fusion::result_of::at_c::type - type; - }; - - template - typename result::type - eval(Env const& /*env*/) const - { - BOOST_ASSERT(scope.frame != 0); - return fusion::at_c(scope.frame->data()); - } - - private: - - DynamicScope const& scope; - }; - - template - struct dynamic : noncopyable - { - typedef fusion::vector tuple_type; - typedef dynamic self_type; - typedef dynamic_frame dynamic_frame_type; - - dynamic() - : frame(0) {} - - BOOST_PP_REPEAT(PHOENIX_DYNAMIC_LIMIT, PHOENIX_DYNAMIC_MEMBER, _) - - private: - - template - friend struct dynamic_member; - - template - friend struct dynamic_frame; - - mutable dynamic_frame_type* frame; - }; -}} - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4355) -#endif - -/* - PHOENIX_DYNAMIC macro(name, type-name sequence) - Example: - - PHOENIX_DYNAMIC( - my_dynamic, - (int, num) - (std::string, message) - (double, real) - ); - - which expands to: - - struct my_dynamic : ::boost::phoenix::dynamic - { - my_dynamic() : num(*this), message(*this), real(*this) {} - - member1 num; - member2 message; - member3 real; - }; - - PHOENIX_DYNAMIC takes the input (containing a binary sequence) - and converts that sequence to a unary sequence of - binary tuples and passes it on to PHOENIX_DYNAMIC_I. - - Thanks to Paul Mensonides for the PP macro help -*/ - -#define PHOENIX_DYNAMIC(name, bseq) \ - PHOENIX_DYNAMIC_I(name, BOOST_PP_CAT(PHOENIX_DYNAMIC_X bseq, 0)) \ - -#define PHOENIX_DYNAMIC_X(x, y) ((x, y)) PHOENIX_DYNAMIC_Y -#define PHOENIX_DYNAMIC_Y(x, y) ((x, y)) PHOENIX_DYNAMIC_X -#define PHOENIX_DYNAMIC_X0 -#define PHOENIX_DYNAMIC_Y0 - -// PHOENIX_DYNAMIC_I generates the overarching structure and uses -// SEQ_FOR_EACH_I to generate the "linear" substructures. - -#define PHOENIX_DYNAMIC_I(name, seq) \ - struct name : \ - ::boost::phoenix::dynamic< \ - BOOST_PP_SEQ_FOR_EACH_I(PHOENIX_DYNAMIC_A, ~, seq)> { \ - name() : BOOST_PP_SEQ_FOR_EACH_I(PHOENIX_DYNAMIC_B, ~, seq) {} \ - BOOST_PP_SEQ_FOR_EACH_I(PHOENIX_DYNAMIC_C, ~, seq) \ - } \ - -#define PHOENIX_DYNAMIC_A(r, _, i, xy) \ - BOOST_PP_COMMA_IF(i) BOOST_PP_TUPLE_ELEM(2, 0, xy) \ - -#define PHOENIX_DYNAMIC_B(r, _, i, xy) \ - BOOST_PP_COMMA_IF(i) BOOST_PP_TUPLE_ELEM(2, 1, xy)(*this) \ - -#define PHOENIX_DYNAMIC_C(r, _, i, xy) \ - BOOST_PP_CAT(member, BOOST_PP_INC(i)) BOOST_PP_TUPLE_ELEM(2, 1, xy); \ - -#undef PHOENIX_DYNAMIC_MEMBER - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - -#endif diff --git a/include/boost/spirit/home/phoenix/scope/lambda.hpp b/include/boost/spirit/home/phoenix/scope/lambda.hpp deleted file mode 100644 index c4a7ce831..000000000 --- a/include/boost/spirit/home/phoenix/scope/lambda.hpp +++ /dev/null @@ -1,176 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - Copyright (c) 2004 Daniel Wallin - - 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_SCOPE_LAMBDA_HPP -#define PHOENIX_SCOPE_LAMBDA_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - template - struct lambda_eval : Base - { - template - struct result - { - typedef typename Base::template - result >::type - result_type; - - typedef typename - detail::unwrap_local_reference::type - type; - }; - - lambda_eval( - Base const& base - , OuterEnv const& outer_env - , Locals const& locals) - : Base(base) - , outer_env(outer_env) - , locals(locals) {} - - template - typename result::type - eval(Env const& env) const - { - typedef typename result::type RT; - return RT(Base::eval( - scoped_environment( - env, outer_env, locals))); - } - - OuterEnv outer_env; - mutable Locals locals; - }; - - template - struct lambda_actor - { - typedef typename - mpl::fold< - Vars - , mpl::false_ - , detail::compute_no_nullary - >::type - no_nullary; - - template - struct result - { - typedef typename - fusion::result_of::as_vector< - typename fusion::result_of::transform< - Vars - , detail::initialize_local - >::type - >::type - locals_type; - - typedef actor > type; - }; - - lambda_actor(Base const& f, Vars const& vars) - : f(f), vars(vars) {} - - template - typename result::type - eval(Env const& env) const - { - typedef typename result::type result_type; - - return result_type( - f, env, fusion::as_vector( - fusion::transform( - vars - , detail::initialize_local(env) - ))); - } - - Base f; - Vars vars; - }; - - template - struct lambda_actor_gen - { - template - actor > const - operator[](actor const& f) const - { - return lambda_actor(f, vars); - } - - lambda_actor_gen(Vars const& vars) - : vars(vars) {} - - Vars vars; - }; - - template - struct local_variable; // forward - struct assign_eval; // forward - - struct lambda_gen - : lambda_actor_gen< - fusion::vector<> - , detail::map_local_index_to_tuple<> > - { - typedef - lambda_actor_gen< - fusion::vector<> - , detail::map_local_index_to_tuple<> > - base_type; - - lambda_gen() - : base_type(fusion::vector<>()) - { - } - - template - lambda_actor_gen< - fusion::vector - , detail::map_local_index_to_tuple - > - operator()( - actor, V0> > > const& a0 - ) const - { - return fusion::vector(fusion::at_c<1>(a0)); - } - - template - lambda_actor_gen< - fusion::vector - , detail::map_local_index_to_tuple - > - operator()( - actor, V0> > > const& a0 - , actor, V1> > > const& a1 - ) const - { - return fusion::vector(fusion::at_c<1>(a0), fusion::at_c<1>(a1)); - } - - // Bring in the rest... - #define PHOENIX_LOCAL_GEN_NAME lambda_actor_gen - #include - #undef PHOENIX_LOCAL_GEN_NAME - }; - - lambda_gen const lambda = lambda_gen(); -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/scope/let.hpp b/include/boost/spirit/home/phoenix/scope/let.hpp deleted file mode 100644 index 40e951a49..000000000 --- a/include/boost/spirit/home/phoenix/scope/let.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - Copyright (c) 2004 Daniel Wallin - - 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_SCOPE_LET_HPP -#define PHOENIX_SCOPE_LET_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - template - struct let_actor : Base - { - typedef typename - mpl::fold< - Vars - , mpl::false_ - , detail::compute_no_nullary - >::type - no_nullary; - - template - struct result - { - typedef typename - fusion::result_of::as_vector< - typename fusion::result_of::transform< - Vars - , detail::initialize_local - >::type - >::type - locals_type; - - typedef typename Base::template - result >::type - result_type; - - typedef typename - detail::unwrap_local_reference::type - type; - }; - - let_actor(Base const& base, Vars const& vars) - : Base(base), vars(vars) {} - - template - typename result::type - eval(Env const& env) const - { - typedef typename - fusion::result_of::as_vector< - typename fusion::result_of::transform< - Vars - , detail::initialize_local - >::type - >::type - locals_type; - - locals_type locals = - fusion::as_vector( - fusion::transform( - vars - , detail::initialize_local(env))); - - typedef typename result::type RT; - return RT(Base::eval( - scoped_environment( - env - , env - , locals))); - } - - Vars vars; - }; - - template - struct let_actor_gen - { - template - actor > const - operator[](actor const& base) const - { - return let_actor(base, vars); - } - - let_actor_gen(Vars const& vars) - : vars(vars) {} - - Vars vars; - }; - - template - struct local_variable; // forward - struct assign_eval; // forward - - struct let_gen - { - template - let_actor_gen< - fusion::vector - , detail::map_local_index_to_tuple - > - operator()( - actor, V0> > > const& a0 - ) const - { - return fusion::vector(fusion::at_c<1>(a0)); - } - - template - let_actor_gen< - fusion::vector - , detail::map_local_index_to_tuple - > - operator()( - actor, V0> > > const& a0 - , actor, V1> > > const& a1 - ) const - { - return fusion::vector(fusion::at_c<1>(a0), fusion::at_c<1>(a1)); - } - - // Bring in the rest... - #define PHOENIX_LOCAL_GEN_NAME let_actor_gen - #include - #undef PHOENIX_LOCAL_GEN_NAME - }; - - let_gen const let = let_gen(); -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/scope/local_variable.hpp b/include/boost/spirit/home/phoenix/scope/local_variable.hpp deleted file mode 100644 index 5987ed441..000000000 --- a/include/boost/spirit/home/phoenix/scope/local_variable.hpp +++ /dev/null @@ -1,111 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - Copyright (c) 2004 Daniel Wallin - - 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_SCOPE_LOCAL_VARIABLE_HPP -#define PHOENIX_SCOPE_LOCAL_VARIABLE_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - template - struct local_variable - { - typedef Key key_type; - - // This will prevent actor::operator()() from kicking in. - // Actually, we do not need all actor::operator()s for - // all arities, but this will suffice. The nullary - // actor::operator() is particularly troublesome because - // it is always eagerly evaluated by the compiler. - typedef mpl::true_ no_nullary; - - template - struct result : detail::apply_local, Env> {}; - - template - typename result::type - eval(Env const& env) const - { - typedef typename result::type return_type; - typedef typename - detail::get_index::type - index_type; - typedef detail::eval_local eval_local; - - return eval_local::template get( - env - , index_type()); - } - - private: - // silence MSVC warning C4512: assignment operator could not be generated - local_variable& operator= (local_variable const&); - }; - - namespace local_names - { - actor > const _a - = local_variable(); - actor > const _b - = local_variable(); - actor > const _c - = local_variable(); - actor > const _d - = local_variable(); - actor > const _e - = local_variable(); - actor > const _f - = local_variable(); - actor > const _g - = local_variable(); - actor > const _h - = local_variable(); - actor > const _i - = local_variable(); - actor > const _j - = local_variable(); - actor > const _k - = local_variable(); - actor > const _l - = local_variable(); - actor > const _m - = local_variable(); - actor > const _n - = local_variable(); - actor > const _o - = local_variable(); - actor > const _p - = local_variable(); - actor > const _q - = local_variable(); - actor > const _r - = local_variable(); - actor > const _s - = local_variable(); - actor > const _t - = local_variable(); - actor > const _u - = local_variable(); - actor > const _v - = local_variable(); - actor > const _w - = local_variable(); - actor > const _x - = local_variable(); - actor > const _y - = local_variable(); - actor > const _z - = local_variable(); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/scope/scoped_environment.hpp b/include/boost/spirit/home/phoenix/scope/scoped_environment.hpp deleted file mode 100644 index b23f9eebc..000000000 --- a/include/boost/spirit/home/phoenix/scope/scoped_environment.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - Copyright (c) 2004 Daniel Wallin - - 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_SCOPE_SCOPED_ENVIRONMENT_HPP -#define PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP - -namespace boost { namespace phoenix -{ - template - struct scoped_environment - { - typedef Env env_type; - typedef OuterEnv outer_env_type; - typedef Locals locals_type; - typedef Map map_type; - typedef typename Env::args_type args_type; - typedef typename Env::tie_type tie_type; - - scoped_environment( - Env const& env - , OuterEnv const& outer_env - , Locals& locals) - : env(env) - , outer_env(outer_env) - , locals(locals) {} - - tie_type const& - args() const - { - return env.args(); - } - - Env const& env; - OuterEnv const& outer_env; - Locals& locals; - - private: - // silence MSVC warning C4512: assignment operator could not be generated - scoped_environment& operator= (scoped_environment const&); - }; -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement.hpp b/include/boost/spirit/home/phoenix/statement.hpp deleted file mode 100644 index 19e169ac7..000000000 --- a/include/boost/spirit/home/phoenix/statement.hpp +++ /dev/null @@ -1,20 +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_STATEMENT_HPP -#define PHOENIX_STATEMENT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/detail/catch_all_eval.hpp b/include/boost/spirit/home/phoenix/statement/detail/catch_all_eval.hpp deleted file mode 100644 index 0609ad85a..000000000 --- a/include/boost/spirit/home/phoenix/statement/detail/catch_all_eval.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_STATEMENT_DETAIL_CATCH_ALL_EVAL_HPP -#define PHOENIX_STATEMENT_DETAIL_CATCH_ALL_EVAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix { - class catch_all_eval - { - public: - template - struct result - { - typedef void type; - }; - - template - static void eval( - const Env& env, TryBody& tryBody, CatchAllBody& catchAllBody) - { - try - { - tryBody.eval(env); - } - catch(...) - { - catchAllBody.eval(env); - } - } - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, PHOENIX_CATCH_LIMIT, "boost/spirit/home/phoenix/statement/detail/catch_all_eval.hpp")) - -#include BOOST_PP_ITERATE() - - }; -}} - -#endif - -#elif BOOST_PP_ITERATION_DEPTH() == 1 - -#define PHOENIX_ITERATION BOOST_PP_ITERATION() - - template - static void eval( - const Env& env, TryBody& tryBody, - BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, CatchBody, catchBody), - CatchAllBody& catchAllBody) - { - try - { - tryBody.eval(env); - } - -#define BOOST_PP_ITERATION_PARAMS_2 \ - (3, (0, BOOST_PP_DEC(PHOENIX_ITERATION), "boost/spirit/home/phoenix/statement/detail/catch_all_eval.hpp")) - -#include BOOST_PP_ITERATE() - - catch(...) - { - catchAllBody.eval(env); - } - } - -#undef PHOENIX_ITERATION - -#elif BOOST_PP_ITERATION_DEPTH() == 2 - -#define PHOENIX_ITERATION BOOST_PP_ITERATION() - - catch(typename BOOST_PP_CAT(CatchBody, PHOENIX_ITERATION)::exception_type&) - { - BOOST_PP_CAT(catchBody, PHOENIX_ITERATION).eval(env); - } - -#undef PHOENIX_ITERATION - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/detail/catch_composite.hpp b/include/boost/spirit/home/phoenix/statement/detail/catch_composite.hpp deleted file mode 100644 index 187731054..000000000 --- a/include/boost/spirit/home/phoenix/statement/detail/catch_composite.hpp +++ /dev/null @@ -1,62 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_STATEMENT_DETAIL_CATCH_COMPOSITE_HPP -#define PHOENIX_STATEMENT_DETAIL_CATCH_COMPOSITE_HPP - -#include -#include -#include - -namespace boost { namespace phoenix { -namespace detail -{ - struct catch_composite_eval - { - template - struct result : - eval_result {}; - - template - static typename result::type - eval(const Env& env, Actor& actor) - { - return actor.eval(env); - } - }; - - template - struct catch_composite : - composite > - { - catch_composite(const Actor& actor) - : composite >(actor) { } - - typedef Exception exception_type; - }; - - template - struct as_catch_actor - { - typedef catch_composite< - Exception, - Actor> comp; - - typedef actor type; - }; - - template - inline typename as_catch_actor::type - catch_actor(const Actor& actor) - { - return catch_composite(actor); - } -} -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/detail/catch_eval.hpp b/include/boost/spirit/home/phoenix/statement/detail/catch_eval.hpp deleted file mode 100644 index bc65e90af..000000000 --- a/include/boost/spirit/home/phoenix/statement/detail/catch_eval.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_STATEMENT_DETAIL_CATCH_EVAL_HPP -#define PHOENIX_STATEMENT_DETAIL_CATCH_EVAL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix { - class catch_eval - { - public: - template - struct result - { - typedef void type; - }; - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, PHOENIX_CATCH_LIMIT, "boost/spirit/home/phoenix/statement/detail/catch_eval.hpp")) - -#include BOOST_PP_ITERATE() - - }; -}} - -#endif - -#elif BOOST_PP_ITERATION_DEPTH() == 1 - -#define PHOENIX_ITERATION BOOST_PP_ITERATION() - - template - static void eval( - const Env& env, TryBody& tryBody, - BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, CatchBody, catchBody)) - { - try - { - tryBody.eval(env); - } - -#define BOOST_PP_ITERATION_PARAMS_2 \ - (3, (0, BOOST_PP_DEC(PHOENIX_ITERATION), "boost/spirit/home/phoenix/statement/detail/catch_eval.hpp")) - -#include BOOST_PP_ITERATE() - - } - -#undef PHOENIX_ITERATION - -#elif BOOST_PP_ITERATION_DEPTH() == 2 - -#define PHOENIX_ITERATION BOOST_PP_ITERATION() - - catch(typename BOOST_PP_CAT(CatchBody, PHOENIX_ITERATION)::exception_type&) - { - BOOST_PP_CAT(catchBody, PHOENIX_ITERATION).eval(env); - } - -#undef PHOENIX_ITERATION - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/detail/switch.hpp b/include/boost/spirit/home/phoenix/statement/detail/switch.hpp deleted file mode 100644 index 537fcb1ce..000000000 --- a/include/boost/spirit/home/phoenix/statement/detail/switch.hpp +++ /dev/null @@ -1,172 +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_STATEMENT_DETAIL_SWITCH_HPP -#define PHOENIX_STATEMENT_DETAIL_SWITCH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - - template - struct switch_case; - - template - struct default_case; - - namespace detail - { - template - struct is_default_case : mpl::bool_ {}; - - template - struct compose_case_a - { - // here, A0 and A1 are both switch cases - typedef typename - mpl::if_< - is_default_case - , fusion::vector, actor > - , fusion::vector, actor > - >::type - type; - - static type - eval(A0 const& _0, A1 const& _1, mpl::false_) - { - return type(_0, _1); - } - - static type - eval(A0 const& _0, A1 const& _1, mpl::true_) - { - return type(_1, _0); - } - - static type - eval(A0 const& _0, A1 const& _1) - { - return eval(_0, _1, is_default_case()); - } - }; - - template - struct compose_case_b - { - typedef typename fusion::result_of::as_vector< - typename mpl::eval_if< - is_default_case - , fusion::result_of::push_front > - , fusion::result_of::push_back > - >::type>::type - type; - - static type - eval(Seq const& seq, Case const& case_, mpl::false_) - { - return fusion::as_vector( - fusion::push_back(seq, actor(case_))); - } - - static type - eval(Seq const& seq, Case const& case_, mpl::true_) - { - return fusion::as_vector( - fusion::push_front(seq, actor(case_))); - } - - static type - eval(Seq const& seq, Case const& case_) - { - return eval(seq, case_, is_default_case()); - } - }; - - template - struct ensure_default - { - typedef - is_default_case< - typename fusion::result_of::value_of< - typename fusion::result_of::begin::type - >::type - > - is_default_case_; - - typedef typename - mpl::eval_if< - is_default_case_ - , mpl::identity - , fusion::result_of::push_front< - Cases const, actor > > > - >::type - type; - - static type - eval(Cases const& cases, mpl::false_); - - static type - eval(Cases const& cases, mpl::true_) - { - return cases; - } - - static type - eval(Cases const& cases) - { - return eval(cases, is_default_case_()); - } - }; - - template - struct switch_composite - { - BOOST_STATIC_ASSERT(fusion::traits::is_sequence::value); - typedef ensure_default ensure_default_; - - typedef typename - fusion::result_of::as_vector< - typename fusion::result_of::push_front< - typename ensure_default_::type, Cond>::type - >::type - tuple_type; - - typedef - composite< - detail::switch_eval::value-2> - , tuple_type> - type; - - static type - eval(Cond const& cond, Cases const& cases) - { - return fusion::as_vector( - fusion::push_front(ensure_default_::eval(cases), cond)); - } - }; - - template - struct switch_composite_actor - { - typedef actor::type> type; - }; - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/detail/switch_eval.hpp b/include/boost/spirit/home/phoenix/statement/detail/switch_eval.hpp deleted file mode 100644 index 220745bab..000000000 --- a/include/boost/spirit/home/phoenix/statement/detail/switch_eval.hpp +++ /dev/null @@ -1,111 +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_STATEMENT_DETAIL_SWITCH_EVAL_HPP -#define PHOENIX_STATEMENT_DETAIL_SWITCH_EVAL_HPP - -namespace boost { namespace phoenix { namespace detail -{ - template - struct switch_eval; - - template <> - struct switch_eval<0> - { - template < - typename Env, typename Cond, typename Default - > - struct result - { - typedef void type; - }; - - template < - typename RT, typename Env, typename Cond, typename Default - > - static void - eval( - Env const& env, Cond& cond, Default& default_ - ) - { - default_.eval(env); - } - }; - - template <> - struct switch_eval<1> - { - template < - typename Env, typename Cond, typename Default - , typename Case0 - > - struct result - { - typedef void type; - }; - - template < - typename RT, typename Env, typename Cond, typename Default - , typename Case0 - > - static void - eval( - Env const& env, Cond& cond, Default& default_ - , Case0& _0 - ) - { - switch (cond.eval(env)) - { - case Case0::value: - _0.eval(env); - break; - default: - default_.eval(env); - } - } - }; - - template <> - struct switch_eval<2> - { - template < - typename Env, typename Cond, typename Default - , typename Case0, typename Case1 - > - struct result - { - typedef void type; - }; - - template < - typename RT, typename Env, typename Cond, typename Default - , typename Case0, typename Case1 - > - static void - eval( - Env const& env, Cond& cond, Default& default_ - , Case0& _0, Case1& _1 - ) - { - switch (cond.eval(env)) - { - case Case0::value: - _0.eval(env); - break; - case Case1::value: - _1.eval(env); - break; - default: - default_.eval(env); - } - } - }; - - // Bring in the rest of the switch_evals - #include -}}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/detail/switch_eval.ipp b/include/boost/spirit/home/phoenix/statement/detail/switch_eval.ipp deleted file mode 100644 index ba4ae7461..000000000 --- a/include/boost/spirit/home/phoenix/statement/detail/switch_eval.ipp +++ /dev/null @@ -1,74 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2006 Joel de Guzman - - Use, modification and distribution is subject to 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_STATEMENT_DETAIL_SWITCH_EVAL_IPP -#define PHOENIX_STATEMENT_DETAIL_SWITCH_EVAL_IPP - -#include -#include -#include -#include -#include -#include - -#define PHOENIX_CASE_ITEM(z, n, prefix) \ - case BOOST_PP_CAT(Case, n)::value: \ - BOOST_PP_CAT(_, n).eval(env); \ - break; - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT)), \ - "boost/spirit/home/phoenix/statement/detail/switch_eval.ipp")) -#include BOOST_PP_ITERATE() - -#undef PHOENIX_CASE_ITEM -#endif - -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// -#else // defined(BOOST_PP_IS_ITERATING) - -#define N BOOST_PP_ITERATION() - - template <> - struct switch_eval - { - template < - typename Env, typename Cond, typename Default - , BOOST_PP_ENUM_PARAMS(N, typename Case) - > - struct result - { - typedef void type; - }; - - template < - typename RT, typename Env, typename Cond, typename Default - , BOOST_PP_ENUM_PARAMS(N, typename Case) - > - static void - eval(Env const& env, Cond& cond, Default& default_ - , BOOST_PP_ENUM_BINARY_PARAMS(N, Case, & _) - ) - { - switch (cond.eval(env)) - { - BOOST_PP_REPEAT(N, PHOENIX_CASE_ITEM, _) - default: - default_.eval(env); - } - } - }; - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - - diff --git a/include/boost/spirit/home/phoenix/statement/do_while.hpp b/include/boost/spirit/home/phoenix/statement/do_while.hpp deleted file mode 100644 index 8d634c94c..000000000 --- a/include/boost/spirit/home/phoenix/statement/do_while.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_STATEMENT_DO_WHILE_HPP -#define PHOENIX_STATEMENT_DO_WHILE_HPP - -#include -#include - -namespace boost { namespace phoenix -{ - struct do_while_eval - { - template - struct result - { - typedef void type; - }; - - template - static void - eval(Env const& env, Cond& cond, Do& do_) - { - do - do_.eval(env); - while (cond.eval(env)); - } - }; - - template - struct do_while_gen - { - do_while_gen(Do const& do_) - : do_(do_) {} - - template - actor::type> - while_(Cond const& cond) const - { - return compose(cond, do_); - } - - Do do_; - }; - - struct do_gen - { - template - do_while_gen - operator[](Do const& do_) const - { - return do_while_gen(do_); - } - }; - - do_gen const do_ = do_gen(); -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/for.hpp b/include/boost/spirit/home/phoenix/statement/for.hpp deleted file mode 100644 index 35e091feb..000000000 --- a/include/boost/spirit/home/phoenix/statement/for.hpp +++ /dev/null @@ -1,64 +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_STATEMENT_FOR_HPP -#define PHOENIX_STATEMENT_FOR_HPP - -#include -#include - -namespace boost { namespace phoenix -{ - struct for_eval - { - template < - typename Env - , typename Init, typename Cond, typename Step, typename Do> - struct result - { - typedef void type; - }; - - template < - typename RT, typename Env - , typename Init, typename Cond, typename Step, typename Do> - static void - eval( - Env const& env - , Init& init, Cond& cond, Step& step, Do& do_) - { - for (init.eval(env); cond.eval(env); step.eval(env)) - do_.eval(env); - } - }; - - template - struct for_gen - { - for_gen(Init const& init, Cond const& cond, Step const& step) - : init(init), cond(cond), step(step) {} - - template - actor::type> - operator[](Do const& do_) const - { - return compose(init, cond, step, do_); - } - - Init init; - Cond cond; - Step step; - }; - - template - inline for_gen - for_(Init const& init, Cond const& cond, Step const& step) - { - return for_gen(init, cond, step); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/if.hpp b/include/boost/spirit/home/phoenix/statement/if.hpp deleted file mode 100644 index 378fec0ca..000000000 --- a/include/boost/spirit/home/phoenix/statement/if.hpp +++ /dev/null @@ -1,130 +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_STATEMENT_IF_HPP -#define PHOENIX_STATEMENT_IF_HPP - -#include -#include -#include - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4355) -#endif - -namespace boost { namespace phoenix -{ - struct if_else_eval - { - template - struct result - { - typedef void type; - }; - - template < - typename RT, typename Env - , typename Cond, typename Then, typename Else> - static void - eval(Env const& env, Cond& cond, Then& then, Else& else_) - { - if (cond.eval(env)) - then.eval(env); - else - else_.eval(env); - } - }; - - struct if_eval - { - template - struct result - { - typedef void type; - }; - - template - static void - eval(Env const& env, Cond& cond, Then& then) - { - if (cond.eval(env)) - then.eval(env); - } - }; - - template - struct if_composite; - - template - struct else_gen - { - else_gen(if_composite const& source) - : source(source) {} - - template - actor::type> - operator[](Else const& else_) const - { - return compose( - fusion::at_c<0>(source) // cond - , fusion::at_c<1>(source) // then - , else_ // else - ); - } - - if_composite const& source; - - private: - // silence MSVC warning C4512: assignment operator could not be generated - else_gen& operator= (else_gen const&); - }; - - template - struct if_composite : composite > - { - if_composite(Cond const& cond, Then const& then) - : composite >(cond, then) - , else_(*this) {} - - else_gen else_; - - private: - // silence MSVC warning C4512: assignment operator could not be generated - if_composite& operator= (if_composite const&); - }; - - template - struct if_gen - { - if_gen(Cond const& cond) - : cond(cond) {} - - template - actor::type> > - operator[](Then const& then) const - { - return actor::type> >( - cond, as_actor::convert(then)); - } - - Cond cond; - }; - - template - inline if_gen::type> - if_(Cond const& cond) - { - return if_gen::type>( - as_actor::convert(cond)); - } -}} - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/sequence.hpp b/include/boost/spirit/home/phoenix/statement/sequence.hpp deleted file mode 100644 index 8a5f0c3e7..000000000 --- a/include/boost/spirit/home/phoenix/statement/sequence.hpp +++ /dev/null @@ -1,55 +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_STATEMENT_SEQUENCE_HPP -#define PHOENIX_STATEMENT_SEQUENCE_HPP - -#include -#include - -namespace boost { namespace phoenix -{ - struct sequence_eval - { - template - struct result - { - typedef void type; - }; - - template - static void - eval(Env const& env, A0& a0, A1& a1) - { - a0.eval(env); - a1.eval(env); - } - }; - - namespace detail - { - template - struct comma_result - { - typedef actor< - typename as_composite< - sequence_eval - , actor - , actor - >::type - > type; - }; - } - - template - inline typename detail::comma_result::type - operator,(actor const& a0, actor const& a1) - { - return compose(a0, a1); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/switch.hpp b/include/boost/spirit/home/phoenix/statement/switch.hpp deleted file mode 100644 index 1229994fa..000000000 --- a/include/boost/spirit/home/phoenix/statement/switch.hpp +++ /dev/null @@ -1,164 +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_STATEMENT_SWITCH_HPP -#define PHOENIX_STATEMENT_SWITCH_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ - template - struct switch_case_base - { - typedef Derived derived_t; - typedef Actor actor_t; - typedef typename Actor::no_nullary no_nullary; - - template - struct result - { - typedef typename Actor::eval_type::template result::type type; - }; - - switch_case_base(Actor const& actor) - : actor(actor) {} - - template - typename result::type - eval(Env const& env) const - { - return actor.eval(env); - } - - Actor actor; - }; - - template - struct switch_case : switch_case_base, Actor> - { - typedef switch_case_base, Actor> base_t; - static K const value = Value; - static bool const is_default = false; - - switch_case(Actor const& actor) - : base_t(actor) {} - }; - - template - struct default_case : switch_case_base, Actor> - { - typedef switch_case_base, Actor> base_t; - static bool const is_default = true; - - default_case(Actor const& actor) - : base_t(actor) {} - }; - - template - struct switch_gen - { - switch_gen(Cond const& cond) - : cond(cond) {} - - template - typename lazy_enable_if< - fusion::traits::is_sequence - , detail::switch_composite_actor - >::type - operator[](Cases const& cases) const - { - typedef typename - detail::switch_composite - switch_composite; - return switch_composite::eval(cond, cases); - } - - template - actor > >::type> - operator[](switch_case_base const& case_) const - { - typedef typename - detail::switch_composite > > - switch_composite; - return switch_composite::eval(cond, - fusion::vector >(static_cast(case_))); - } - - Cond cond; - }; - - template - inline switch_gen::type> - switch_(Cond const& cond) - { - return switch_gen::type>( - as_actor::convert(cond)); - } - - template - switch_case::type, int, N> - case_(A0 const& _0) - { - return switch_case::type, int, N> - (as_actor::convert(_0)); - } - - template - default_case::type> - default_(A0 const& _0) - { - return default_case::type> - (as_actor::convert(_0)); - } - - template - inline typename detail::compose_case_a::type - operator,( - switch_case_base const& _0 - , switch_case_base const& _1 - ) - { - return detail::compose_case_a::eval( - static_cast(_0) - , static_cast(_1) - ); - } - - template - inline typename - lazy_enable_if< - fusion::traits::is_sequence - , detail::compose_case_b - >::type - operator,(Seq const& seq, switch_case_base const& case_) - { - return detail::compose_case_b::eval( - seq, static_cast(case_)); - } - - // Implementation of routines in detail/switch.hpp that depend on - // the completeness of default_case. - namespace detail { - template - typename ensure_default::type - ensure_default::eval(Cases const& cases, mpl::false_) - { - actor > > default_ - = default_case >(nothing); - return fusion::push_front(cases, default_); - } - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/throw.hpp b/include/boost/spirit/home/phoenix/statement/throw.hpp deleted file mode 100644 index 87a087274..000000000 --- a/include/boost/spirit/home/phoenix/statement/throw.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_STATEMENT_THROW_HPP -#define PHOENIX_STATEMENT_THROW_HPP - -#include -#include -#include - -#include - -namespace boost { namespace phoenix { - - struct throw_new_eval - { - template - struct result - { - typedef void type; - }; - - template - static void - eval(const Env& env, ThrowExpr& throwExpr) - { - throw throwExpr.eval(env); - } - }; - - struct throw_again_eval - { - typedef mpl::false_ no_nullary; - - template - struct result - { - typedef void type; - }; - - template - void eval(const Env&) const - { - throw; - } - }; - - inline actor throw_() - { - return throw_again_eval(); - } - - template - actor::type> - throw_(const Actor& a) - { - return compose(a); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/try_catch.hpp b/include/boost/spirit/home/phoenix/statement/try_catch.hpp deleted file mode 100644 index dccfd425a..000000000 --- a/include/boost/spirit/home/phoenix/statement/try_catch.hpp +++ /dev/null @@ -1,188 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2007 Dan Marsden - Copyright (c) 2005-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_STATEMENT_TRY_CATCH_HPP -#define PHOENIX_STATEMENT_TRY_CATCH_HPP - -#include -#include - -#include -#include - -#include -#include -#include - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4355) -#endif - -namespace boost { namespace phoenix { - - template struct try_catch_composite; - - namespace meta - { - template - struct try_catch_composite_push_back - { - typedef typename Composite::base_type actor_tuple; - typedef try_catch_composite< - typename fusion::result_of::as_vector< - typename fusion::result_of::push_back< - actor_tuple, Actor>::type>::type> type; - }; - - template - struct catch_all_composite_push_back - { - typedef typename Composite::base_type actor_tuple; - - typedef composite< - catch_all_eval, - typename fusion::result_of::as_vector< - typename fusion::result_of::push_back< - actor_tuple, Actor>::type>::type> type; - }; - } - - namespace detail - { - struct try_catch_composite_push_back - { - template - struct result - : meta::try_catch_composite_push_back - {}; - - template - typename result::type - operator()( - const Composite& composite, const Actor& actor) const - { - typedef typename result::type result; - return result( - fusion::as_vector( - fusion::push_back(composite, actor))); - } - }; - - struct catch_all_composite_push_back - { - template - struct result - : meta::catch_all_composite_push_back - {}; - - template - typename result::type - operator()( - const Composite& composite, const Actor& actor) const - { - typedef typename result::type result; - return result( - fusion::as_vector( - fusion::push_back(composite, actor))); - } - }; - - } - - detail::try_catch_composite_push_back const try_catch_composite_push_back - = detail::try_catch_composite_push_back(); - detail::catch_all_composite_push_back const catch_all_composite_push_back - = detail::catch_all_composite_push_back(); - - template - struct catch_gen - { - explicit catch_gen( - const SourceComposite& sourceComposite) - : mSourceComposite(sourceComposite) { } - - template - actor >::type> - operator[](const Actor& actor) const - { - return try_catch_composite_push_back( - mSourceComposite, detail::catch_composite(actor)); - } - - const SourceComposite& mSourceComposite; - }; - - template - struct catch_all_gen - { - explicit catch_all_gen( - const SourceComposite& sourceComposite) - : mSourceComposite(sourceComposite) { } - - template - actor::type> - operator[](const Actor& actor) const - { - return catch_all_composite_push_back( - mSourceComposite, actor); - } - - const SourceComposite& mSourceComposite; - }; - - template - struct try_catch_composite - : composite - { - explicit try_catch_composite( - const Tuple& t) - : - composite(t), - catch_all(*this) { } - - try_catch_composite( - const try_catch_composite& rhs) - : composite(rhs), - catch_all(*this) { } - - template - catch_gen catch_() const - { - return catch_gen( - *this); - } - - const catch_all_gen catch_all; - - private: - try_catch_composite& operator=(const try_catch_composite&); - }; - - struct try_gen - { - template - try_catch_composite > operator[]( - const Try& try_) const - { - typedef fusion::vector tuple_type; - return try_catch_composite( - tuple_type(try_)); - } - }; - - try_gen const try_ = try_gen(); -}} - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - -#endif diff --git a/include/boost/spirit/home/phoenix/statement/while.hpp b/include/boost/spirit/home/phoenix/statement/while.hpp deleted file mode 100644 index 96b988c29..000000000 --- a/include/boost/spirit/home/phoenix/statement/while.hpp +++ /dev/null @@ -1,56 +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_STATEMENT_WHILE_HPP -#define PHOENIX_STATEMENT_WHILE_HPP - -#include -#include - -namespace boost { namespace phoenix -{ - struct while_eval - { - template - struct result - { - typedef void type; - }; - - template - static void - eval(Env const& env, Cond& cond, Do& do_) - { - while (cond.eval(env)) - do_.eval(env); - } - }; - - template - struct while_gen - { - while_gen(Cond const& cond) - : cond(cond) {} - - template - actor::type> - operator[](Do const& do_) const - { - return compose(cond, do_); - } - - Cond cond; - }; - - template - inline while_gen - while_(Cond const& cond) - { - return while_gen(cond); - } -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl.hpp b/include/boost/spirit/home/phoenix/stl.hpp deleted file mode 100644 index 12832f7d9..000000000 --- a/include/boost/spirit/home/phoenix/stl.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================= - Copyright (c) 2006 Daniel Wallin - Copyright (c) 2005 Dan Marsden - Copyright (c) 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_STL_HPP -#define PHOENIX_STL_HPP - -#include -#include - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm.hpp b/include/boost/spirit/home/phoenix/stl/algorithm.hpp deleted file mode 100644 index 01f4f9d15..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/*============================================================================= - Copyright (c) 2004 Angus Leeming - Copyright (c) 2006 Daniel Wallin - Copyright (c) 2005 Dan Marsden - Copyright (c) 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_STL_ALGORITHM_HPP -#define PHOENIX_STL_ALGORITHM_HPP - -#include -#include -#include - -#endif // PHOENIX_STL_ALGORITHM_HPP diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/begin.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/begin.hpp deleted file mode 100644 index 165aae87a..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/begin.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler - -#ifndef PHOENIX_ALGORITHM_DETAIL_BEGIN_HPP -#define PHOENIX_ALGORITHM_DETAIL_BEGIN_HPP - -#include -#include - -namespace boost { namespace phoenix { -namespace detail -{ - template - typename range_result_iterator::type - begin_(R& r) - { - return boost::begin(r); - } -} -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/decay_array.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/decay_array.hpp deleted file mode 100644 index 1ea263d85..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/decay_array.hpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler - -#ifndef PHOENIX_ALGORITHM_DETAIL_DECAY_ARRAY_HPP -#define PHOENIX_ALGORITHM_DETAIL_DECAY_ARRAY_HPP - -namespace boost { namespace phoenix { -namespace detail -{ - template - struct decay_array - { - typedef T type; - }; - - template - struct decay_array - { - typedef T* type; - }; -} -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/end.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/end.hpp deleted file mode 100644 index 4386d3a9d..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/end.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler - -#ifndef PHOENIX_ALGORITHM_DETAIL_END_HPP -#define PHOENIX_ALGORITHM_DETAIL_END_HPP - -#include -#include - -namespace boost { namespace phoenix { -namespace detail -{ - template - typename range_result_iterator::type - end_(R& r) - { - return boost::end(r); - } -} -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_equal_range.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_equal_range.hpp deleted file mode 100644 index 3392b8c3e..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_equal_range.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_equal_range.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_EQUAL_RANGE_EN_14_12_2004 -#define HAS_EQUAL_RANGE_EN_14_12_2004 - -#include -#include "./is_std_map.hpp" -#include "./is_std_set.hpp" -#include "./is_std_hash_map.hpp" -#include "./is_std_hash_set.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_equal_range - : boost::mpl::or_< - boost::mpl::or_< - is_std_map - , is_std_multimap - , is_std_set - , is_std_multiset - > - , boost::mpl::or_< - is_std_hash_map - , is_std_hash_multimap - , is_std_hash_set - , is_std_hash_multiset - > - > - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_find.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_find.hpp deleted file mode 100644 index 0c5bb67e0..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_find.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_find.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_FIND_EN_14_12_2004 -#define HAS_FIND_EN_14_12_2004 - -#include -#include "./is_std_map.hpp" -#include "./is_std_set.hpp" -#include "./is_std_hash_map.hpp" -#include "./is_std_hash_set.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_find - : boost::mpl::or_< - boost::mpl::or_< - is_std_map - , is_std_multimap - , is_std_set - , is_std_multiset - > - , boost::mpl::or_< - is_std_hash_map - , is_std_hash_multimap - , is_std_hash_set - , is_std_hash_multiset - > - > - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_lower_bound.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_lower_bound.hpp deleted file mode 100644 index cfaf99b40..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_lower_bound.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_lower_bound.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_LOWER_BOUND_EN_14_12_2004 -#define HAS_LOWER_BOUND_EN_14_12_2004 - -#include -#include "./is_std_map.hpp" -#include "./is_std_set.hpp" -#include "./is_std_hash_map.hpp" -#include "./is_std_hash_set.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_lower_bound - : boost::mpl::or_< - boost::mpl::or_< - is_std_map - , is_std_multimap - , is_std_set - , is_std_multiset - > - , boost::mpl::or_< - is_std_hash_map - , is_std_hash_multimap - , is_std_hash_set - , is_std_hash_multiset - > - > - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_remove.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_remove.hpp deleted file mode 100644 index e1f389c6b..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_remove.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_remove.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_REMOVE_EN_14_12_2004 -#define HAS_REMOVE_EN_14_12_2004 - -#include "./is_std_list.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_remove - : is_std_list - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_remove_if.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_remove_if.hpp deleted file mode 100644 index a05f4a577..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_remove_if.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_remove_if.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_REMOVE_IF_EN_14_12_2004 -#define HAS_REMOVE_IF_EN_14_12_2004 - -#include "./is_std_list.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_remove_if - : is_std_list - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_reverse.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_reverse.hpp deleted file mode 100644 index 74011d1f7..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_reverse.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_reverse.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_REVERSE_EN_14_12_2004 -#define HAS_REVERSE_EN_14_12_2004 - -#include "./is_std_list.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_reverse - : is_std_list - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_sort.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_sort.hpp deleted file mode 100644 index ac5c41bcc..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_sort.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_sort.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_SORT_EN_14_12_2004 -#define HAS_SORT_EN_14_12_2004 - -#include "./is_std_list.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_sort - : is_std_list - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_unique.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_unique.hpp deleted file mode 100644 index 8e8fed5b1..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_unique.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_unique.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_UNIQUE_EN_14_12_2004 -#define HAS_UNIQUE_EN_14_12_2004 - -#include "./is_std_list.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_unique - : is_std_list - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_upper_bound.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_upper_bound.hpp deleted file mode 100644 index 0b81edb8c..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/has_upper_bound.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// has_upper_bound.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -#pragma once -#endif - -#ifndef HAS_UPPER_BOUND_EN_14_12_2004 -#define HAS_UPPER_BOUND_EN_14_12_2004 - -#include -#include "./is_std_map.hpp" -#include "./is_std_set.hpp" -#include "./is_std_hash_map.hpp" -#include "./is_std_hash_set.hpp" - -namespace boost -{ - // Specialize this for user-defined types - template - struct has_upper_bound - : boost::mpl::or_< - boost::mpl::or_< - is_std_map - , is_std_multimap - , is_std_set - , is_std_multiset - > - , boost::mpl::or_< - is_std_hash_map - , is_std_hash_multimap - , is_std_hash_set - , is_std_hash_multiset - > - > - { - }; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_hash_map.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_hash_map.hpp deleted file mode 100644 index 8581e9d0d..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_hash_map.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// is_std_hash_map.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -# pragma once -#endif - -#ifndef IS_STD_HASH_MAP_EN_16_12_2004 -#define IS_STD_HASH_MAP_EN_16_12_2004 - -#include -#include "./std_hash_map_fwd.hpp" - -namespace boost -{ - template - struct is_std_hash_map - : boost::mpl::false_ - {}; - - template - struct is_std_hash_multimap - : boost::mpl::false_ - {}; - -#ifdef BOOST_HAS_HASH - - template< - class Kty - , class Ty - , class Hash - , class Cmp - , class Alloc - > - struct is_std_hash_map< ::BOOST_STD_EXTENSION_NAMESPACE::hash_map > - : boost::mpl::true_ - {}; - - template< - class Kty - , class Ty - , class Hash - , class Cmp - , class Alloc - > - struct is_std_hash_multimap< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multimap > - : boost::mpl::true_ - {}; - -#elif defined(BOOST_DINKUMWARE_STDLIB) - - template< - class Kty - , class Ty - , class Tr - , class Alloc - > - struct is_std_hash_map< ::BOOST_STD_EXTENSION_NAMESPACE::hash_map > - : boost::mpl::true_ - {}; - - template< - class Kty - , class Ty - , class Tr - , class Alloc - > - struct is_std_hash_multimap< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multimap > - : boost::mpl::true_ - {}; - -#endif - -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_hash_set.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_hash_set.hpp deleted file mode 100644 index 59d1cbe1a..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_hash_set.hpp +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// is_std_hash_set.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -# pragma once -#endif - -#ifndef IS_STD_HASH_SET_EN_16_12_2004 -#define IS_STD_HASH_SET_EN_16_12_2004 - -#include -#include "./std_hash_set_fwd.hpp" - -namespace boost -{ - template - struct is_std_hash_set - : boost::mpl::false_ - {}; - - template - struct is_std_hash_multiset - : boost::mpl::false_ - {}; - -#if defined(BOOST_HAS_HASH) - - template< - class Kty - , class Hash - , class Cmp - , class Alloc - > - struct is_std_hash_set< ::BOOST_STD_EXTENSION_NAMESPACE::hash_set > - : boost::mpl::true_ - {}; - - template< - class Kty - , class Hash - , class Cmp - , class Alloc - > - struct is_std_hash_multiset< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multiset > - : boost::mpl::true_ - {}; - -#elif defined(BOOST_DINKUMWARE_STDLIB) - - template< - class Kty - , class Tr - , class Alloc - > - struct is_std_hash_set< ::BOOST_STD_EXTENSION_NAMESPACE::hash_set > - : boost::mpl::true_ - {}; - - template< - class Kty - , class Tr - , class Alloc - > - struct is_std_hash_multiset< ::BOOST_STD_EXTENSION_NAMESPACE::hash_multiset > - : boost::mpl::true_ - {}; - -#endif - -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_list.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_list.hpp deleted file mode 100644 index 3b632f86d..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_list.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// is_std_list.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -# pragma once -#endif - -#ifndef IS_STD_LIST_EN_16_12_2004 -#define IS_STD_LIST_EN_16_12_2004 - -#include -#include - -namespace boost -{ - template - struct is_std_list - : boost::mpl::false_ - {}; - - template< - class Ty - , class Alloc - > - struct is_std_list< ::std::list > - : boost::mpl::true_ - {}; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_map.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_map.hpp deleted file mode 100644 index 738ab7888..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_map.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// is_std_map.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -# pragma once -#endif - -#ifndef IS_STD_MAP_EN_16_12_2004 -#define IS_STD_MAP_EN_16_12_2004 - -#include -#include - -namespace boost -{ - template - struct is_std_map - : boost::mpl::false_ - {}; - - template< - class Kty - , class Ty - , class Pr - , class Alloc - > - struct is_std_map< ::std::map > - : boost::mpl::true_ - {}; - - template - struct is_std_multimap - : boost::mpl::false_ - {}; - - template< - class Kty - , class Ty - , class Pr - , class Alloc - > - struct is_std_multimap< ::std::multimap > - : boost::mpl::true_ - {}; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_set.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_set.hpp deleted file mode 100644 index 3533c21fc..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/is_std_set.hpp +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// is_std_set.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -# pragma once -#endif - -#ifndef IS_STD_SET_EN_16_12_2004 -#define IS_STD_SET_EN_16_12_2004 - -#include -#include - -namespace boost -{ - template - struct is_std_set - : boost::mpl::false_ - {}; - - template< - class Kty - , class Pr - , class Alloc - > - struct is_std_set< ::std::set > - : boost::mpl::true_ - {}; - - template - struct is_std_multiset - : boost::mpl::false_ - {}; - - template< - class Kty - , class Pr - , class Alloc - > - struct is_std_multiset< ::std::multiset > - : boost::mpl::true_ - {}; -} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/std_hash_map_fwd.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/std_hash_map_fwd.hpp deleted file mode 100644 index ab88c4f7f..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/std_hash_map_fwd.hpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// std_hash_map_fwd.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -# pragma once -#endif - -#ifndef STD_HASH_MAP_FWD_EN_16_12_2004 -#define STD_HASH_MAP_FWD_EN_16_12_2004 - -#include - -#if defined(BOOST_HAS_HASH) - -namespace BOOST_STD_EXTENSION_NAMESPACE -{ - template< - class Kty - , class Ty - , class Hash - , class Cmp - , class Alloc - > - class hash_map; - - template< - class Kty - , class Ty - , class Hash - , class Cmp - , class Alloc - > - class hash_multimap; -} - -#elif defined(BOOST_DINKUMWARE_STDLIB) - -namespace BOOST_STD_EXTENSION_NAMESPACE -{ - template< - class Kty - , class Ty - , class Tr - , class Alloc - > - class hash_map; - - template< - class Kty - , class Ty - , class Tr - , class Alloc - > - class hash_multimap; -} - -#endif - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/detail/std_hash_set_fwd.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/detail/std_hash_set_fwd.hpp deleted file mode 100644 index c1efbc556..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/detail/std_hash_set_fwd.hpp +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler -/////////////////////////////////////////////////////////////////////////////// -// -// std_hash_set_fwd.hpp -// -///////////////////////////////////////////////////////////////////////////// - -#if defined(_MSC_VER) -# pragma once -#endif - -#ifndef STD_HASH_SET_FWD_EN_16_12_2004 -#define STD_HASH_SET_FWD_EN_16_12_2004 - -#include - -#if defined(BOOST_HAS_HASH) - -namespace BOOST_STD_EXTENSION_NAMESPACE -{ - template< - class Kty - , class Hash - , class Cmp - , class Alloc - > - class hash_set; - - template< - class Kty - , class Hash - , class Cmp - , class Alloc - > - class hash_multiset; -} - -#elif defined(BOOST_DINKUMWARE_STDLIB) - -namespace BOOST_STD_EXTENSION_NAMESPACE -{ - template< - class Kty - , class Tr - , class Alloc - > - class hash_set; - - template< - class Kty - , class Tr - , class Alloc - > - class hash_multiset; -} - -#endif - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/iteration.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/iteration.hpp deleted file mode 100644 index c11905e73..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/iteration.hpp +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// Copyright 2005 Dan Marsden. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler - -#ifndef PHOENIX_ALGORITHM_ITERATION_HPP -#define PHOENIX_ALGORITHM_ITERATION_HPP - -#include -#include - -#include -#include - -#include - -namespace boost { namespace phoenix { -namespace impl -{ - struct for_each - { - template - struct result - { - typedef F type; - }; - - template - F operator()(R& r, F fn) const - { - return std::for_each(detail::begin_(r), detail::end_(r), fn); - } - }; - - struct accumulate - { - template - struct result - { - typedef I type; - }; - - template - typename result::type - operator()(R& r, I i) const - { - return std::accumulate(detail::begin_(r), detail::end_(r), i); - } - - template - typename result::type - operator()(R& r, I i, C c) const - { - return std::accumulate(detail::begin_(r), detail::end_(r), i, c); - } - }; -} - -function const for_each = impl::for_each(); -function const accumulate = impl::accumulate(); - -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/querying.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/querying.hpp deleted file mode 100644 index 87456fd7f..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/querying.hpp +++ /dev/null @@ -1,502 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// Copyright 2005 Dan Marsden. -// Copyright 2008 Hartmut Kaiser. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler - -#ifndef PHOENIX_ALGORITHM_QUERYING_HPP -#define PHOENIX_ALGORITHM_QUERYING_HPP - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -namespace boost { namespace phoenix { -namespace impl -{ - struct find - { - template - struct result : range_result_iterator - {}; - - template - typename result::type execute(R& r, T const& x, mpl::true_) const - { - return r.find(x); - } - - template - typename result::type execute(R& r, T const& x, mpl::false_) const - { - return std::find(detail::begin_(r), detail::end_(r), x); - } - - template - typename result::type operator()(R& r, T const& x) const - { - return execute(r, x, has_find()); - } - }; - - struct find_if - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r, P p) const - { - return std::find_if(detail::begin_(r), detail::end_(r), p); - } - }; - - struct find_end - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r, R2& r2) const - { - return std::find_end( - detail::begin_(r) - , detail::end_(r) - , detail::begin_(r2) - , detail::end_(r2) - ); - } - - template - typename result::type operator()(R& r, R2& r2, P p) const - { - return std::find_end( - detail::begin_(r) - , detail::end_(r) - , detail::begin_(r2) - , detail::end_(r2) - , p - ); - } - }; - - struct find_first_of - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r, R2& r2) const - { - return std::find_first_of( - detail::begin_(r) - , detail::end_(r) - , detail::begin_(r2) - , detail::end_(r2) - ); - } - - template - typename result::type operator()(R& r, R2& r2, P p) const - { - return std::find_first_of( - detail::begin_(r) - , detail::end_(r) - , detail::begin_(r2) - , detail::end_(r2) - , p - ); - } - }; - - struct adjacent_find - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r) const - { - return std::adjacent_find(detail::begin_(r), detail::end_(r)); - } - - template - typename result::type operator()(R& r, P p) const - { - return std::adjacent_find(detail::begin_(r), detail::end_(r), p); - } - }; - - struct count - { - template - struct result : range_difference - {}; - - template - typename result::type operator()(R& r, T const& x) const - { - return std::count(detail::begin_(r), detail::end_(r), x); - } - }; - - struct count_if - { - template - struct result : range_difference - {}; - - template - typename result::type operator()(R& r, P p) const - { - return std::count_if(detail::begin_(r), detail::end_(r), p); - } - }; - - struct distance - { - template - struct result : range_difference - {}; - - template - typename result::type operator()(R& r) const - { - return std::distance(detail::begin_(r), detail::end_(r)); - } - }; - - struct equal - { - template - struct result - { - typedef bool type; - }; - - template - bool operator()(R& r, I i) const - { - return std::equal(detail::begin_(r), detail::end_(r), i); - } - - template - bool operator()(R& r, I i, P p) const - { - return std::equal(detail::begin_(r), detail::end_(r), i, p); - } - }; - - struct search - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r, R2& r2) const - { - return std::search( - detail::begin_(r) - , detail::end_(r) - , detail::begin_(r2) - , detail::end_(r2) - ); - } - - template - typename result::type operator()(R& r, R2& r2, P p) const - { - return std::search( - detail::begin_(r) - , detail::end_(r) - , detail::begin_(r2) - , detail::end_(r2) - , p - ); - } - }; - - struct lower_bound - { - template - struct result : range_result_iterator - {}; - - template - typename result::type execute(R& r, T const& val, mpl::true_) const - { - return r.lower_bound(val); - } - - template - typename result::type execute(R& r, T const& val, mpl::false_) const - { - return std::lower_bound(detail::begin_(r), detail::end_(r), val); - } - - template - typename result::type operator()(R& r, T const& val) const - { - return execute(r, val, has_lower_bound()); - } - - template - typename result::type operator()(R& r, T const& val, C c) const - { - return std::lower_bound(detail::begin_(r), detail::end_(r), val, c); - } - }; - - struct upper_bound - { - template - struct result : range_result_iterator - {}; - - template - typename result::type execute(R& r, T const& val, mpl::true_) const - { - return r.upper_bound(val); - } - - template - typename result::type execute(R& r, T const& val, mpl::false_) const - { - return std::upper_bound(detail::begin_(r), detail::end_(r), val); - } - - template - typename result::type operator()(R& r, T const& val) const - { - return execute(r, val, has_upper_bound()); - } - - template - typename result::type operator()(R& r, T const& val, C c) const - { - return std::upper_bound(detail::begin_(r), detail::end_(r), val, c); - } - }; - - struct equal_range - { - template - struct result - { - typedef std::pair< - typename range_result_iterator::type - , typename range_result_iterator::type - > type; - }; - - template - typename result::type execute(R& r, T const& val, mpl::true_) const - { - return r.equal_range(val); - } - - template - typename result::type execute(R& r, T const& val, mpl::false_) const - { - return std::equal_range(detail::begin_(r), detail::end_(r), val); - } - - template - typename result::type operator()(R& r, T const& val) const - { - return execute(r, val, has_equal_range()); - } - - template - typename result::type operator()(R& r, T const& val, C c) const - { - return std::equal_range(detail::begin_(r), detail::end_(r), val, c); - } - }; - - struct mismatch - { - template - struct result - { - typedef std::pair< - typename range_result_iterator::type - , typename detail::decay_array::type - > type; - }; - - template - typename result::type operator()(R& r, I i) const - { - return std::mismatch(detail::begin_(r), detail::end_(r), i); - } - - template - typename result::type operator()(R& r, I i, P p) const - { - return std::mismatch(detail::begin_(r), detail::end_(r), i, p); - } - }; - - struct binary_search - { - template - struct result - { - typedef bool type; - }; - - template - bool operator()(R& r, T const& val) const - { - return std::binary_search(detail::begin_(r), detail::end_(r), val); - } - - template - bool operator()(R& r, T const& val, C c) const - { - return std::binary_search(detail::begin_(r), detail::end_(r), val, c); - } - }; - - struct includes - { - template - struct result - { - typedef bool type; - }; - - template - bool operator()(R1& r1, R2& r2) const - { - return std::includes( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - ); - } - - template - bool operator()(R1& r1, R2& r2, C c) const - { - return std::includes( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , c - ); - } - }; - - struct min_element - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r) const - { - return std::min_element(detail::begin_(r), detail::end_(r)); - } - - template - typename result::type operator()(R& r, P p) const - { - return std::min_element(detail::begin_(r), detail::end_(r), p); - } - }; - - struct max_element - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r) const - { - return std::max_element(detail::begin_(r), detail::end_(r)); - } - - template - typename result::type operator()(R& r, P p) const - { - return std::max_element(detail::begin_(r), detail::end_(r), p); - } - }; - - struct lexicographical_compare - { - template - struct result - { - typedef bool type; - }; - - template - typename result::type operator()(R1& r1, R2& r2) const - { - return std::lexicographical_compare( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - ); - } - - template - typename result::type operator()(R1& r1, R2& r2, P p) const - { - return std::lexicographical_compare( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , p - ); - } - }; - -} - -function const find = impl::find(); -function const find_if = impl::find_if(); -function const find_end = impl::find_end(); -function const find_first_of = impl::find_first_of(); -function const adjacent_find = impl::adjacent_find(); -function const count = impl::count(); -function const count_if = impl::count_if(); -function const distance = impl::distance(); -function const equal = impl::equal(); -function const search = impl::search(); -function const lower_bound = impl::lower_bound(); -function const upper_bound = impl::upper_bound(); -function const equal_range = impl::equal_range(); -function const mismatch = impl::mismatch(); -function const binary_search = impl::binary_search(); -function const includes = impl::includes(); -function const min_element = impl::min_element(); -function const max_element = impl::max_element(); -function const lexicographical_compare = impl::lexicographical_compare(); - -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/algorithm/transformation.hpp b/include/boost/spirit/home/phoenix/stl/algorithm/transformation.hpp deleted file mode 100644 index 7405be788..000000000 --- a/include/boost/spirit/home/phoenix/stl/algorithm/transformation.hpp +++ /dev/null @@ -1,1071 +0,0 @@ -// Copyright 2005 Daniel Wallin. -// Copyright 2005 Joel de Guzman. -// Copyright 2005 Dan Marsden. -// -// Use, modification and distribution is subject to 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) -// -// Modeled after range_ex, Copyright 2004 Eric Niebler - -#ifndef PHOENIX_ALGORITHM_TRANSFORMATION_HPP -#define PHOENIX_ALGORITHM_TRANSFORMATION_HPP - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include - -#include - -namespace boost { namespace phoenix { namespace impl -{ - struct swap - { - template - struct result - { - typedef void type; - }; - - template - void operator()(A& a, B& b) const - { - using std::swap; - swap(a, b); - } - }; - - struct copy - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type - operator()(R& r, I i) const - { - return std::copy(detail::begin_(r), detail::end_(r), i); - } - }; - - struct copy_backward - { - template - struct result - { - typedef I type; - }; - - template - I operator()(R& r, I i) const - { - return std::copy_backward(detail::begin_(r), detail::end_(r), i); - } - }; - - struct transform - { - template - struct result - : detail::decay_array< - typename mpl::if_, OutorI1, ForOut>::type> - { - }; - - template - typename result::type - operator()(R& r, O o, F f) const - { - return std::transform(detail::begin_(r), detail::end_(r), o, f); - } - - template - typename result::type - operator()(R& r, I i, O o, F f) const - { - return std::transform(detail::begin_(r), detail::end_(r), i, o, f); - } - }; - - struct replace - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, T const& what, T const& with) const - { - std::replace(detail::begin_(r), detail::end_(r), what, with); - } - }; - - struct replace_if - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, P p, T const& with) const - { - std::replace_if(detail::begin_(r), detail::end_(r), p, with); - } - }; - - struct replace_copy - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type - operator()(R& r, O o, T const& what, T const& with) const - { - return std::replace_copy(detail::begin_(r), detail::end_(r), o, what, with); - } - }; - - struct replace_copy_if - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type - operator()(R& r, O o, P p, T const& with) const - { - return std::replace_copy_if(detail::begin_(r), detail::end_(r), o, p, with); - } - }; - - struct fill - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, T const& x) const - { - std::fill(detail::begin_(r), detail::end_(r), x); - } - }; - - struct fill_n - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, N n, T const& x) const - { - std::fill_n(detail::begin_(r), n, x); - } - }; - - struct generate - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, G g) const - { - std::generate(detail::begin_(r), detail::end_(r), g); - } - }; - - struct generate_n - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, N n, G g) const - { - std::generate_n(detail::begin_(r), n, g); - } - }; - - struct remove - { - template - struct result : range_result_iterator - { - }; - - template - typename result::type execute(R& r, T const& x, mpl::true_) const - { - r.remove(x); - return detail::end_(r); - } - - template - typename result::type execute(R& r, T const& x, mpl::false_) const - { - return std::remove(detail::begin_(r), detail::end_(r), x); - } - - template - typename result::type operator()(R& r, T const& x) const - { - return execute(r, x, has_remove()); - } - }; - - struct remove_if - { - template - struct result : range_result_iterator - { - }; - - template - typename result::type execute(R& r, P p, mpl::true_) const - { - r.remove_if(p); - return detail::end_(r); - } - - template - typename result::type execute(R& r, P p, mpl::false_) const - { - return std::remove_if(detail::begin_(r), detail::end_(r), p); - } - - template - typename result::type operator()(R& r, P p) const - { - return execute(r, p, has_remove_if()); - } - }; - - struct remove_copy - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type - operator()(R& r, O o, T const& x) const - { - return std::remove_copy(detail::begin_(r), detail::end_(r), o, x); - } - }; - - struct remove_copy_if - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type - operator()(R& r, O o, P p) const - { - return std::remove_copy_if(detail::begin_(r), detail::end_(r), o, p); - } - }; - - struct unique - { - template - struct result : range_result_iterator - { - }; - - template - typename result::type execute(R& r, mpl::true_) const - { - r.unique(); - return detail::end_(r); - } - - template - typename result::type execute(R& r, mpl::false_) const - { - return std::unique(detail::begin_(r), detail::end_(r)); - } - - template - typename result::type operator()(R& r) const - { - return execute(r, has_unique()); - } - - - template - typename result::type execute(R& r, P p, mpl::true_) const - { - r.unique(p); - return detail::end_(r); - } - - template - typename result::type execute(R& r, P p, mpl::false_) const - { - return std::unique(detail::begin_(r), detail::end_(r), p); - } - - template - typename result::type operator()(R& r, P p) const - { - return execute(r, p, has_unique()); - } - }; - - struct unique_copy - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type operator()(R& r, O o) const - { - return std::unique_copy( - detail::begin_(r) - , detail::end_(r) - , o - ); - } - - template - typename result::type operator()(R& r, O o, P p) const - { - return std::unique_copy( - detail::begin_(r) - , detail::end_(r) - , o - , p - ); - } - }; - - struct reverse - { - template - struct result - { - typedef void type; - }; - - template - void execute(R& r, mpl::true_) const - { - r.reverse(); - } - - template - void execute(R& r, mpl::false_) const - { - std::reverse(detail::begin_(r), detail::end_(r)); - } - - template - void operator()(R& r) const - { - execute(r, has_reverse()); - } - }; - - struct reverse_copy - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type operator()(R& r, O o) const - { - return std::reverse_copy( - detail::begin_(r) - , detail::end_(r) - , o - ); - } - }; - - struct rotate - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, M m) const - { - std::rotate( - detail::begin_(r) - , m - , detail::end_(r) - ); - } - }; - - struct rotate_copy - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type operator()(R& r, M m, O o) const - { - return std::rotate_copy( - detail::begin_(r) - , m - , detail::end_(r) - , o - ); - } - }; - - struct random_shuffle - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r) const - { - return std::random_shuffle(detail::begin_(r), detail::end_(r)); - } - - template - void operator()(R& r, G g) const - { - return std::random_shuffle(detail::begin_(r), detail::end_(r), g); - } - }; - - struct partition - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r, P p) const - { - return std::partition(detail::begin_(r), detail::end_(r), p); - } - }; - - struct stable_partition - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R& r, P p) const - { - return std::stable_partition(detail::begin_(r), detail::end_(r), p); - } - }; - - struct sort - { - template - struct result - { - typedef void type; - }; - - template - void execute(R& r, mpl::true_) const - { - r.sort(); - } - - template - void execute(R& r, mpl::false_) const - { - std::sort(detail::begin_(r), detail::end_(r)); - } - - template - void operator()(R& r) const - { - execute(r, has_sort()); - } - - template - void execute(R& r, C c, mpl::true_) const - { - r.sort(c); - } - - template - void execute(R& r, C c, mpl::false_) const - { - std::sort(detail::begin_(r), detail::end_(r), c); - } - - template - void operator()(R& r, C c) const - { - execute(r, c, has_sort()); - } - }; - - struct stable_sort - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r) const - { - std::stable_sort(detail::begin_(r), detail::end_(r)); - } - - template - void operator()(R& r, C c) const - { - std::stable_sort(detail::begin_(r), detail::end_(r), c); - } - }; - - struct partial_sort - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, M m) const - { - std::partial_sort(detail::begin_(r), m, detail::end_(r)); - } - - template - void operator()(R& r, M m, C c) const - { - std::partial_sort(detail::begin_(r), m, detail::end_(r), c); - } - }; - - struct partial_sort_copy - { - template - struct result : range_result_iterator - {}; - - template - typename result::type operator()(R1& r1, R2& r2) const - { - return std::partial_sort_copy( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - ); - } - - template - typename result::type operator()(R1& r1, R2& r2, C c) const - { - return std::partial_sort_copy( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , c - ); - } - }; - - struct nth_element - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, N n) const - { - return std::nth_element(detail::begin_(r), n, detail::end_(r)); - } - - template - void operator()(R& r, N n, C c) const - { - return std::nth_element(detail::begin_(r), n, detail::end_(r), c); - } - }; - - struct merge - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type operator()(R1& r1, R2& r2, O o) const - { - return std::merge( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - ); - } - - template - typename result::type operator()(R1& r1, R2& r2, O o, C c) const - { - return std::merge( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - , c - ); - } - }; - - struct inplace_merge - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r, M m) const - { - return std::inplace_merge(detail::begin_(r), m, detail::end_(r)); - } - - template - void operator()(R& r, M m, C c) const - { - return std::inplace_merge(detail::begin_(r), m, detail::end_(r), c); - } - }; - - struct next_permutation - { - template - struct result - { - typedef bool type; - }; - - template - bool operator()(R& r) const - { - return std::next_permutation(detail::begin_(r), detail::end_(r)); - } - - template - bool operator()(R& r, C c) const - { - return std::next_permutation(detail::begin_(r), detail::end_(r), c); - } - }; - - struct prev_permutation - { - template - struct result - { - typedef bool type; - }; - - template - bool operator()(R& r) const - { - return std::prev_permutation(detail::begin_(r), detail::end_(r)); - } - - template - bool operator()(R& r, C c) const - { - return std::prev_permutation(detail::begin_(r), detail::end_(r), c); - } - }; - - - struct inner_product - { - template - struct result - { - typedef T type; - }; - - template - typename result::type - operator()(R& r, I i, T t) const - { - return std::inner_product( - detail::begin_(r), detail::end_(r), i, t); - } - - template - typename result::type - operator()(R& r, I i, T t, C1 c1, C2 c2) const - { - return std::inner_product( - detail::begin_(r), detail::end_(r), i, - t, c1, c2); - } - }; - - struct partial_sum - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type - operator()(R& r, I i) const - { - return std::partial_sum( - detail::begin_(r), detail::end_(r), i); - } - - template - typename result::type - operator()(R& r, I i, C c) const - { - return std::partial_sum( - detail::begin_(r), detail::end_(r), i, c); - } - }; - - struct adjacent_difference - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type - operator()(R& r, I i) const - { - return std::adjacent_difference( - detail::begin_(r), detail::end_(r), i); - } - - template - typename result::type - operator()(R& r, I i, C c) const - { - return std::adjacent_difference( - detail::begin_(r), detail::end_(r), i, c); - } - }; - - struct push_heap - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r) const - { - std::push_heap(detail::begin_(r), detail::end_(r)); - } - - template - void operator()(R& r, C c) const - { - std::push_heap(detail::begin_(r), detail::end_(r), c); - } - }; - - struct pop_heap - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r) const - { - std::pop_heap(detail::begin_(r), detail::end_(r)); - } - - template - void operator()(R& r, C c) const - { - std::pop_heap(detail::begin_(r), detail::end_(r), c); - } - }; - - struct make_heap - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r) const - { - std::make_heap(detail::begin_(r), detail::end_(r)); - } - - template - void operator()(R& r, C c) const - { - std::make_heap(detail::begin_(r), detail::end_(r), c); - } - }; - - struct sort_heap - { - template - struct result - { - typedef void type; - }; - - template - void operator()(R& r) const - { - std::sort_heap(detail::begin_(r), detail::end_(r)); - } - - template - void operator()(R& r, C c) const - { - std::sort_heap(detail::begin_(r), detail::end_(r), c); - } - }; - - struct set_union - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type operator()(R1& r1, R2& r2, O o) const - { - return std::set_union( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - ); - } - - template - typename result::type operator()(R1& r1, R2& r2, O o, C c) const - { - return std::set_union( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - , c - ); - } - }; - - struct set_intersection - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type operator()(R1& r1, R2& r2, O o) const - { - return std::set_intersection( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - ); - } - - template - typename result::type operator()(R1& r1, R2& r2, O o, C c) const - { - return std::set_intersection( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - , c - ); - } - }; - - struct set_difference - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type operator()(R1& r1, R2& r2, O o) const - { - return std::set_difference( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - ); - } - - template - typename result::type operator()(R1& r1, R2& r2, O o, C c) const - { - return std::set_difference( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - , c - ); - } - }; - - struct set_symmetric_difference - { - template - struct result - : detail::decay_array - {}; - - template - typename result::type operator()(R1& r1, R2& r2, O o) const - { - return std::set_symmetric_difference( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - ); - } - - template - typename result::type operator()(R1& r1, R2& r2, O o, C c) const - { - return std::set_symmetric_difference( - detail::begin_(r1), detail::end_(r1) - , detail::begin_(r2), detail::end_(r2) - , o - , c - ); - } - }; - -}}} // boost::phoenix::impl - -namespace boost { namespace phoenix -{ - function const swap = impl::swap(); - function const copy = impl::copy(); - function const copy_backward = impl::copy_backward(); - function const transform = impl::transform(); - function const replace = impl::replace(); - function const replace_if = impl::replace_if(); - function const replace_copy = impl::replace_copy(); - function const replace_copy_if = impl::replace_copy_if(); - function const fill = impl::fill(); - function const fill_n = impl::fill_n(); - function const generate = impl::generate(); - function const generate_n = impl::generate_n(); - function const remove = impl::remove(); - function const remove_if = impl::remove_if(); - function const remove_copy = impl::remove_copy(); - function const remove_copy_if = impl::remove_copy_if(); - function const unique = impl::unique(); - function const unique_copy = impl::unique_copy(); - function const reverse = impl::reverse(); - function const reverse_copy = impl::reverse_copy(); - function const rotate = impl::rotate(); - function const rotate_copy = impl::rotate_copy(); - function const random_shuffle = impl::random_shuffle(); - function const partition = impl::partition(); - function const stable_partition = impl::stable_partition(); - function const sort = impl::sort(); - function const stable_sort = impl::stable_sort(); - function const partial_sort = impl::partial_sort(); - function const partial_sort_copy = impl::partial_sort_copy(); - function const nth_element = impl::nth_element(); - function const merge = impl::merge(); - function const inplace_merge = impl::inplace_merge(); - function const next_permutation = impl::next_permutation(); - function const prev_permutation = impl::prev_permutation(); - function const inner_product = impl::inner_product(); - function const partial_sum = impl::partial_sum(); - function const adjacent_difference = impl::adjacent_difference(); - function const push_heap = impl::push_heap(); - function const pop_heap = impl::pop_heap(); - function const make_heap = impl::make_heap(); - function const sort_heap = impl::sort_heap(); - function const set_union = impl::set_union(); - function const set_intersection = impl::set_intersection(); - function const set_difference = impl::set_difference(); - function const set_symmetric_difference = impl::set_symmetric_difference(); -}} - -#endif diff --git a/include/boost/spirit/home/phoenix/stl/container.hpp b/include/boost/spirit/home/phoenix/stl/container.hpp deleted file mode 100644 index 6798fcb43..000000000 --- a/include/boost/spirit/home/phoenix/stl/container.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2004 Angus Leeming - Copyright (c) 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_STL_CONTAINER_HPP -#define PHOENIX_STL_CONTAINER_HPP - -#include - -#endif // PHOENIX_STL_CONTAINER_HPP diff --git a/include/boost/spirit/home/phoenix/stl/container/container.hpp b/include/boost/spirit/home/phoenix/stl/container/container.hpp deleted file mode 100644 index 7e043d1d5..000000000 --- a/include/boost/spirit/home/phoenix/stl/container/container.hpp +++ /dev/null @@ -1,706 +0,0 @@ -/*============================================================================= - Copyright (c) 2004 Angus Leeming - Copyright (c) 2004 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_STL_CONTAINER_CONTAINER_HPP -#define PHOENIX_STL_CONTAINER_CONTAINER_HPP - -#include -#include -#include -#include -#include -#include - -namespace boost { namespace phoenix -{ -/////////////////////////////////////////////////////////////////////////////// -// -// STL container member functions -// -// Lazy functions for STL container member functions -// -// These functions provide a mechanism for the lazy evaluation of the -// public member functions of the STL containers. For an overview of -// what is meant by 'lazy evaluation', see the comments in operators.hpp -// and functions.hpp. -// -// Lazy functions are provided for all of the member functions of the -// following containers: -// -// deque - list - map - multimap - vector. -// -// Indeed, should *your* class have member functions with the same names -// and signatures as those listed below, then it will automatically be -// supported. To summarize, lazy functions are provided for member -// functions: -// -// assign - at - back - begin - capacity - clear - empty - end - -// erase - front - get_allocator - insert - key_comp - max_size - -// pop_back - pop_front - push_back - push_front - rbegin - rend - -// reserve - resize . size - splice - value_comp. -// -// The lazy functions' names are the same as the corresponding member -// function. Sample usage: -// -// "Normal" version "Lazy" version -// ---------------- -------------- -// my_vector.at(5) phoenix::at(arg1, 5) -// my_list.size() phoenix::size(arg1) -// my_vector1.swap(my_vector2) phoenix::swap(arg1, arg2) -// -// Notice that member functions with names that clash with a -// function in stl algorithms are absent. This will be provided -// in Phoenix's algorithm module. -// -// No support is provided here for lazy versions of operator+=, -// operator[] etc. Such operators are not specific to STL containers and -// lazy versions can therefore be found in operators.hpp. -// -/////////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -// -// Lazy member function implementaions. -// -// The structs below provide the guts of the implementation. Thereafter, -// the corresponding lazy function itself is simply: -// -// function const assign = stl::assign(); -// -// The structs provide a nested "result" class template whose -// "type" typedef enables the lazy function to ascertain the type -// to be returned when it is invoked. -// -// They also provide operator() member functions with signatures -// corresponding to those of the underlying member function of -// the STL container. -// -/////////////////////////////////////////////////////////////////////////////// - namespace stl - { - struct assign - { - template < - typename C - , typename Arg1 = fusion::void_ - , typename Arg2 = fusion::void_ - , typename Arg3 = fusion::void_ - > - struct result - { - typedef typename add_reference::type type; - }; - - template - C& operator()(C& c, Arg1 const& arg1) const - { - c.assign(arg1); - return c; - } - - template - C& operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const - { - c.assign(arg1, arg2); - return c; - } - - template - C& operator()( - C& c - , Arg1 const& arg1 - , Arg2 const& arg2 - , Arg3 const& arg3) const - { - return c.assign(arg1, arg2, arg3); - } - }; - - struct at - { - template - struct result - { - typedef typename const_qualified_reference_of::type type; - }; - - template - typename result::type - operator()(C& c, Index const& i) const - { - return c.at(i); - } - }; - - struct back - { - template - struct result - { - typedef - typename const_qualified_reference_of::type - type; - }; - - template - typename result::type - operator()(C& c) const - { - return c.back(); - } - }; - - struct begin - { - template - struct result - { - typedef typename const_qualified_iterator_of::type type; - }; - - template - typename result::type - operator()(C& c) const - { - return c.begin(); - } - }; - - struct capacity - { - template - struct result - { - typedef typename size_type_of::type type; - }; - - template - typename result::type - operator()(C const& c) const - { - return c.capacity(); - } - }; - - struct clear - { - template - struct result - { - typedef void type; - }; - - template - void operator()(C& c) const - { - return c.clear(); - } - }; - - struct empty - { - template - struct result - { - typedef bool type; - }; - - template - bool operator()(C const& c) const - { - return c.empty(); - } - }; - - struct end - { - template - struct result - { - typedef typename const_qualified_iterator_of::type type; - }; - - template - typename result::type - operator()(C& c) const - { - return c.end(); - } - }; - - struct erase - { - // This mouthful can differentiate between the generic erase - // functions (Container == std::deque, std::list, std::vector) and - // that specific to the two map-types, std::map and std::multimap. - // - // where C is a std::deque, std::list, std::vector: - // - // 1) iterator C::erase(iterator where); - // 2) iterator C::erase(iterator first, iterator last); - // - // where M is a std::map or std::multimap: - // - // 3) size_type M::erase(const Key& keyval); - // 4) void M::erase(iterator where); - // 5) void M::erase(iterator first, iterator last); - - template - struct result - { - // BOOST_MSVC #if branch here in map_erase_result non- - // standard behavior. The return type should be void but - // VC7.1 prefers to return iterator_of. As a result, - // VC7.1 complains of error C2562: - // boost::phoenix::stl::erase::operator() 'void' function - // returning a value. Oh well... :* - - typedef - boost::mpl::eval_if< - boost::is_same::type> -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1500) - , iterator_of -#else - , boost::mpl::identity -#endif - , size_type_of - > - map_erase_result; - - typedef typename - boost::mpl::eval_if< - has_mapped_type - , map_erase_result - , iterator_of - >::type - type; - }; - - template - typename result::type - operator()(C& c, Arg1 const& arg1) const - { - return c.erase(arg1); - } - - template - typename result::type - operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const - { - return c.erase(arg1, arg2); - } - }; - - struct front - { - template - struct result - { - typedef typename const_qualified_reference_of::type type; - }; - - template - typename result::type - operator()(C& c) const - { - return c.front(); - } - }; - - struct get_allocator - { - template - struct result - { - typedef typename allocator_type_of::type type; - }; - - template - typename result::type - operator()(C const& c) const - { - return c.get_allocator(); - } - }; - - struct insert - { - // This mouthful can differentiate between the generic insert - // functions (Container == deque, list, vector) and those - // specific to the two map-types, std::map and std::multimap. - // - // where C is a std::deque, std::list, std::vector: - // - // 1) iterator C::insert(iterator where, value_type value); - // 2) void C::insert( - // iterator where, size_type count, value_type value); - // 3) template - // void C::insert(iterator where, Iter first, Iter last); - // - // where M is a std::map and MM is a std::multimap: - // - // 4) pair M::insert(value_type const&); - // 5) iterator MM::insert(value_type const&); - // - // where M is a std::map or std::multimap: - // - // 6) template - // void M::insert(Iter first, Iter last); - - template < - typename C - , typename Arg1 - , typename Arg2 = fusion::void_ - , typename Arg3 = fusion::void_ - > - class result - { - struct pair_iterator_bool - { - typedef typename std::pair type; - }; - - typedef - boost::mpl::eval_if< - map_insert_returns_pair - , pair_iterator_bool - , iterator_of - > - choice_1; - - typedef - boost::mpl::eval_if< - boost::mpl::and_< - boost::is_same - , boost::mpl::not_ > > - , iterator_of - , boost::mpl::identity - > - choice_2; - - public: - - typedef typename - boost::mpl::eval_if< - boost::is_same - , choice_1 - , choice_2 - >::type - type; - }; - - template - typename result::type - operator()(C& c, Arg1 const& arg1) const - { - return c.insert(arg1); - } - - template - typename result::type - operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const - { - return c.insert(arg1, arg2); - } - - template - typename result::type - operator()( - C& c, Arg1 const& arg1, Arg2 const& arg2, Arg3 const& arg3) const - { - return c.insert(arg1, arg2, arg3); - } - }; - - struct key_comp - { - template - struct result - { - typedef typename key_compare_of::type type; - }; - - template - typename result::type - operator()(C const& c) const - { - return c.key_comp(); - } - }; - - struct max_size - { - template - struct result - { - typedef typename size_type_of::type type; - }; - - template - typename result::type - operator()(C const& c) const - { - return c.max_size(); - } - }; - - struct pop_back - { - template - struct result - { - typedef void type; - }; - - template - void operator()(C& c) const - { - return c.pop_back(); - } - }; - - struct pop_front - { - template - struct result - { - typedef void type; - }; - - template - void operator()(C& c) const - { - return c.pop_front(); - } - }; - - struct push_back - { - template - struct result - { - typedef void type; - }; - - template - void operator()(C& c, Arg const& data) const - { - return c.push_back(data); - } - }; - - struct push_front - { - template - struct result - { - typedef void type; - }; - - template - void operator()(C& c, Arg const& data) const - { - return c.push_front(data); - } - }; - - struct rbegin - { - template - struct result - { - typedef typename - const_qualified_reverse_iterator_of::type - type; - }; - - template - typename result::type - operator()(C& c) const - { - return c.rbegin(); - } - }; - - struct rend - { - template - struct result - { - typedef typename - const_qualified_reverse_iterator_of::type - type; - }; - - template - typename result::type - operator()(C& c) const - { - return c.rend(); - } - }; - - struct reserve - { - - template - struct result - { - typedef void type; - }; - - template - void operator()(C& c, Arg const& count) const - { - return c.reserve(count); - } - }; - - struct resize - { - template - struct result - { - typedef void type; - }; - - template - void operator()(C& c, Arg1 const& arg1) const - { - return c.resize(arg1); - } - - template - void operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const - { - return c.resize(arg1, arg2); - } - }; - - struct size - { - template - struct result - { - typedef typename size_type_of::type type; - }; - - template - typename result::type - operator()(C const& c) const - { - return c.size(); - } - }; - - struct splice - { - template < - typename C - , typename Arg1 - , typename Arg2 - , typename Arg3 = fusion::void_ - , typename Arg4 = fusion::void_ - > - struct result - { - typedef void type; - }; - - template - void operator()(C& c, Arg1 const& arg1, Arg2& arg2) const - { - c.splice(arg1, arg2); - } - - template < - typename C - , typename Arg1 - , typename Arg2 - , typename Arg3 - > - void operator()( - C& c - , Arg1 const& arg1 - , Arg2& arg2 - , Arg3 const& arg3 - ) const - { - c.splice(arg1, arg2, arg3); - } - - template < - typename C - , typename Arg1 - , typename Arg2 - , typename Arg3 - , typename Arg4 - > - void operator()( - C& c - , Arg1 const& arg1 - , Arg2& arg2 - , Arg3 const& arg3 - , Arg4 const& arg4 - ) const - { - c.splice(arg1, arg2, arg3, arg4); - } - }; - - struct value_comp - { - template - struct result - { - typedef typename value_compare_of::type type; - }; - - template - typename result::type - operator()(C const& c) const - { - return c.value_comp(); - } - }; - -} // namespace stl - -/////////////////////////////////////////////////////////////////////////////// -// -// The lazy functions themselves. -// -/////////////////////////////////////////////////////////////////////////////// -function const assign = stl::assign(); -function const at = stl::at(); -function const back = stl::back(); -function const begin = stl::begin(); -function const capacity = stl::capacity(); -function const clear = stl::clear(); -function const empty = stl::empty(); -function const end = stl::end(); -function const erase = stl::erase(); -function const front = stl::front(); -function const get_allocator = stl::get_allocator(); -function const insert = stl::insert(); -function const key_comp = stl::key_comp(); -function const max_size = stl::max_size(); -function const pop_back = stl::pop_back(); -function const pop_front = stl::pop_front(); -function const push_back = stl::push_back(); -function const push_front = stl::push_front(); -function const rbegin = stl::rbegin(); -function const rend = stl::rend(); -function const reserve = stl::reserve(); -function const resize = stl::resize(); -function const size = stl::size(); -function const splice = stl::splice(); -function const value_comp = stl::value_comp(); - -}} // namespace boost::phoenix - -#endif // PHOENIX_STL_CONTAINERS_HPP diff --git a/include/boost/spirit/home/phoenix/stl/container/detail/container.hpp b/include/boost/spirit/home/phoenix/stl/container/detail/container.hpp deleted file mode 100644 index eecf68dba..000000000 --- a/include/boost/spirit/home/phoenix/stl/container/detail/container.hpp +++ /dev/null @@ -1,173 +0,0 @@ -/*============================================================================= - Copyright (c) 2004 Angus Leeming - Copyright (c) 2004 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_CONTAINER_DETAIL_CONTAINER_HPP -#define PHOENIX_CONTAINER_DETAIL_CONTAINER_HPP - -#include -#include -#include -#include - -namespace boost { namespace phoenix { namespace stl -{ -/////////////////////////////////////////////////////////////////////////////// -// -// Metafunctions "value_type_of", "key_type_of" etc. -// -// These metafunctions define a typedef "type" that returns the nested -// type if it exists. If not then the typedef returns void. -// -// For example, "value_type_of >::type" is "int" whilst -// "value_type_of::type" is "void". -// -// I use a macro to define structs "value_type_of" etc simply to cut -// down on the amount of code. The macro is #undef-ed immediately after -// its final use. -// -/////////////////////////////////////////////////////////////////c////////////// -#define MEMBER_TYPE_OF(MEMBER_TYPE) \ - template \ - struct BOOST_PP_CAT(MEMBER_TYPE, _of) \ - { \ - typedef typename C::MEMBER_TYPE type; \ - } - - MEMBER_TYPE_OF(allocator_type); - MEMBER_TYPE_OF(const_iterator); - MEMBER_TYPE_OF(const_reference); - MEMBER_TYPE_OF(const_reverse_iterator); - MEMBER_TYPE_OF(container_type); - MEMBER_TYPE_OF(data_type); - MEMBER_TYPE_OF(iterator); - MEMBER_TYPE_OF(key_compare); - MEMBER_TYPE_OF(key_type); - MEMBER_TYPE_OF(reference); - MEMBER_TYPE_OF(reverse_iterator); - MEMBER_TYPE_OF(size_type); - MEMBER_TYPE_OF(value_compare); - MEMBER_TYPE_OF(value_type); - -#undef MEMBER_TYPE_OF - -/////////////////////////////////////////////////////////////////////////////// -// -// Const-Qualified types. -// -// Many of the stl member functions have const and non-const -// overloaded versions that return distinct types. For example: -// -// iterator begin(); -// const_iterator begin() const; -// -// The three class templates defined below, -// const_qualified_reference_of, const_qualified_iterator_of -// and const_qualified_reverse_iterator_of provide a means to extract -// this return type automatically. -// -/////////////////////////////////////////////////////////////////////////////// - template - struct const_qualified_reference_of - { - typedef typename - boost::mpl::eval_if< - boost::is_const - , const_reference_of - , reference_of - >::type - type; - }; - - template - struct const_qualified_iterator_of - { - typedef typename - boost::mpl::eval_if< - boost::is_const - , const_iterator_of - , iterator_of - >::type - type; - }; - - template - struct const_qualified_reverse_iterator_of - { - typedef typename - boost::mpl::eval_if< - boost::is_const - , const_reverse_iterator_of - , reverse_iterator_of - >::type - type; - }; - -/////////////////////////////////////////////////////////////////////////////// -// -// has_mapped_type -// -// Given a container C, determine if it is a map or multimap -// by checking if it has a member type named "mapped_type". -// -/////////////////////////////////////////////////////////////////////////////// - namespace stl_impl - { - struct one { char a[1]; }; - struct two { char a[2]; }; - - template - one has_mapped_type(typename C::mapped_type(*)()); - - template - two has_mapped_type(...); - } - - template - struct has_mapped_type - : boost::mpl::bool_< - sizeof(stl_impl::has_mapped_type(0)) == sizeof(stl_impl::one) - > - {}; - -/////////////////////////////////////////////////////////////////////////////// -// -// map_insert_returns_pair -// -// Distinguish a map from a multimap by checking the return type -// of its "insert" member function. A map returns a pair while -// a multimap returns an iterator. -// -/////////////////////////////////////////////////////////////////////////////// - namespace stl_impl - { - // Cool implementation of map_insert_returns_pair by Daniel Wallin. - // Thanks Daniel!!! I owe you a Pizza! - - template - one map_insert_returns_pair_check(std::pair const&); - - template - two map_insert_returns_pair_check(T const&); - - template - struct map_insert_returns_pair - { - static typename C::value_type const& get; - BOOST_STATIC_CONSTANT(int, - value = sizeof( - map_insert_returns_pair_check(((C*)0)->insert(get)))); - typedef boost::mpl::bool_ type; - }; - } - - template - struct map_insert_returns_pair - : stl_impl::map_insert_returns_pair::type {}; - -}}} // namespace boost::phoenix::stl - -#endif // PHOENIX_STL_CONTAINER_TRAITS_HPP diff --git a/include/boost/spirit/home/phoenix/version.hpp b/include/boost/spirit/home/phoenix/version.hpp deleted file mode 100644 index c29baf8e4..000000000 --- a/include/boost/spirit/home/phoenix/version.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*============================================================================= - Copyright (c) 2005-2008 Hartmut Kaiser - Copyright (c) 2005-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_VERSION_HPP -#define PHOENIX_VERSION_HPP - -/////////////////////////////////////////////////////////////////////////////// -// -// This is the version of the library -// -/////////////////////////////////////////////////////////////////////////////// -#define BOOST_PHOENIX_VERSION 0x2000 // 2.0.0 - -#endif diff --git a/include/boost/spirit/home/support/argument_expression.hpp b/include/boost/spirit/home/support/argument_expression.hpp index ff5d4cec5..ccf5021dd 100644 --- a/include/boost/spirit/home/support/argument_expression.hpp +++ b/include/boost/spirit/home/support/argument_expression.hpp @@ -21,29 +21,6 @@ namespace boost { namespace spirit namespace expression { -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - template - struct argument - { - typedef phoenix::actor > type; - - static type make() - { - return spirit::argument(); - } - }; - - template - struct attribute_context - { - typedef phoenix::actor > type; - - static type make() - { - return spirit::attribute_context(); - } - }; -#else template struct argument : phoenix::expression::terminal > @@ -73,11 +50,9 @@ namespace boost { namespace spirit return e; } }; -#endif } }} -#ifdef BOOST_SPIRIT_USE_PHOENIX_V3 namespace boost { namespace phoenix { namespace result_of @@ -127,6 +102,5 @@ namespace boost { namespace phoenix > {}; }} -#endif // BOOST_SPIRIT_USE_PHOENIX_V3 #endif diff --git a/include/boost/spirit/home/support/detail/is_spirit_tag.hpp b/include/boost/spirit/home/support/detail/is_spirit_tag.hpp index 73269e22e..e8f9f6dc2 100644 --- a/include/boost/spirit/home/support/detail/is_spirit_tag.hpp +++ b/include/boost/spirit/home/support/detail/is_spirit_tag.hpp @@ -11,10 +11,6 @@ #pragma once #endif -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#define BOOST_SPIRIT_IS_TAG() -#else #define BOOST_SPIRIT_IS_TAG() typedef void is_spirit_tag; -#endif #endif diff --git a/include/boost/spirit/home/support/limits.hpp b/include/boost/spirit/home/support/limits.hpp index ff53967f1..8abb4f140 100644 --- a/include/boost/spirit/home/support/limits.hpp +++ b/include/boost/spirit/home/support/limits.hpp @@ -12,17 +12,6 @@ #include -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - -#if !defined(SPIRIT_ARGUMENTS_LIMIT) -# define SPIRIT_ARGUMENTS_LIMIT PHOENIX_LIMIT -#endif -#if !defined(SPIRIT_ATTRIBUTES_LIMIT) -# define SPIRIT_ATTRIBUTES_LIMIT PHOENIX_LIMIT -#endif - -#else - #if !defined(SPIRIT_ARGUMENTS_LIMIT) # define SPIRIT_ARGUMENTS_LIMIT BOOST_PHOENIX_LIMIT #endif @@ -31,5 +20,3 @@ #endif #endif - -#endif diff --git a/include/boost/spirit/home/support/make_component.hpp b/include/boost/spirit/home/support/make_component.hpp index 91a1d4d38..3868475c6 100644 --- a/include/boost/spirit/home/support/make_component.hpp +++ b/include/boost/spirit/home/support/make_component.hpp @@ -362,13 +362,6 @@ namespace boost { namespace spirit { namespace detail )>::type lhs_component; -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - typedef typename - proto::result_of::value< - typename proto::result_of::child_c::type - >::type - rhs_component; -#else typedef typename mpl::eval_if_c< phoenix::is_actor< @@ -380,7 +373,6 @@ namespace boost { namespace spirit { namespace detail > >::type rhs_component; -#endif typedef typename result_of::make_cons< @@ -396,24 +388,6 @@ namespace boost { namespace spirit { namespace detail result::type result_type; -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - result_type operator()( - typename impl::expr_param expr - , typename impl::state_param state - , typename impl::data_param data - ) const - { - elements_type elements = - detail::make_cons( - Grammar()( - proto::child_c<0>(expr), state, data) // LHS - , detail::make_cons( - proto::value(proto::child_c<1>(expr))) // RHS - ); - - return make_component_()(elements, data); - } -#else result_type operator()( typename impl::expr_param expr , typename impl::state_param state @@ -466,7 +440,6 @@ namespace boost { namespace spirit { namespace detail return make_component_()(elements, data); } -#endif }; }; }}} diff --git a/include/boost/spirit/home/support/terminal.hpp b/include/boost/spirit/home/support/terminal.hpp index f9b23de02..f7e25987b 100644 --- a/include/boost/spirit/home/support/terminal.hpp +++ b/include/boost/spirit/home/support/terminal.hpp @@ -547,7 +547,6 @@ namespace boost { namespace spirit }} -#ifdef BOOST_SPIRIT_USE_PHOENIX_V3 namespace boost { namespace phoenix { template @@ -567,7 +566,6 @@ namespace boost { namespace phoenix } }; }} -#endif // Define a spirit terminal. This macro may be placed in any namespace. // Common placeholders are placed in the main boost::spirit namespace diff --git a/include/boost/spirit/home/support/terminal_expression.hpp b/include/boost/spirit/home/support/terminal_expression.hpp index cf6bc5de5..0d206bfd9 100644 --- a/include/boost/spirit/home/support/terminal_expression.hpp +++ b/include/boost/spirit/home/support/terminal_expression.hpp @@ -9,67 +9,4 @@ #if !defined(BOOST_SPIRIT_TERMINAL_EXPRESSION_MARCH_24_2011_1210AM) #define BOOST_SPIRIT_TERMINAL_EXPRESSION_MARCH_24_2011_1210AM -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - -namespace boost { namespace phoenix { namespace detail -{ - namespace expression - { - template < - typename F, typename A0 = void, typename A1 = void - , typename A2 = void, typename Dummy = void> - struct function_eval; - - template - struct function_eval - { - typedef phoenix::actor< - typename phoenix::as_composite< - phoenix::detail::function_eval<1>, F, A0 - >::type - > type; - - static type make(F f, A0 const & _0) - { - return phoenix::compose< - phoenix::detail::function_eval<1> >(f, _0); - } - }; - - template - struct function_eval - { - typedef phoenix::actor< - typename phoenix::as_composite< - phoenix::detail::function_eval<2>, F, A0, A1 - >::type - > type; - - static type make(F f, A0 const & _0, A1 const & _1) - { - return phoenix::compose< - phoenix::detail::function_eval<2> >(f, _0, _1); - } - }; - - template - struct function_eval - { - typedef phoenix::actor< - typename phoenix::as_composite< - phoenix::detail::function_eval<3>, F, A0, A1, A2 - >::type - > type; - - static type make(F f, A0 const & _0, A1 const & _1, A2 const & _2) - { - return phoenix::compose< - phoenix::detail::function_eval<3> >(f, _0, _1, _2); - } - }; - } -}}} - -#endif // !BOOST_SPIRIT_USE_PHOENIX_V3 - #endif diff --git a/include/boost/spirit/include/phoenix.hpp b/include/boost/spirit/include/phoenix.hpp index f60958739..7915d74d1 100644 --- a/include/boost/spirit/include/phoenix.hpp +++ b/include/boost/spirit/include/phoenix.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX #define BOOST_SPIRIT_INCLUDE_PHOENIX - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_algorithm.hpp b/include/boost/spirit/include/phoenix_algorithm.hpp index 4b97d4cf4..9b434e4c6 100644 --- a/include/boost/spirit/include/phoenix_algorithm.hpp +++ b/include/boost/spirit/include/phoenix_algorithm.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_ALGORITHM #define BOOST_SPIRIT_INCLUDE_PHOENIX_ALGORITHM - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_bind.hpp b/include/boost/spirit/include/phoenix_bind.hpp index f289ac02c..1c8cd4ebf 100644 --- a/include/boost/spirit/include/phoenix_bind.hpp +++ b/include/boost/spirit/include/phoenix_bind.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_BIND #define BOOST_SPIRIT_INCLUDE_PHOENIX_BIND - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_container.hpp b/include/boost/spirit/include/phoenix_container.hpp index 95b13a25a..c78e28b0d 100644 --- a/include/boost/spirit/include/phoenix_container.hpp +++ b/include/boost/spirit/include/phoenix_container.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_CONTAINER #define BOOST_SPIRIT_INCLUDE_PHOENIX_CONTAINER - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_core.hpp b/include/boost/spirit/include/phoenix_core.hpp index 55b5010ec..d08ed0668 100644 --- a/include/boost/spirit/include/phoenix_core.hpp +++ b/include/boost/spirit/include/phoenix_core.hpp @@ -8,12 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_CORE #define BOOST_SPIRIT_INCLUDE_PHOENIX_CORE - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#define BOOST_PHOENIX_DEFINE_CUSTOM_TERMINAL(A,B,C,D) -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_function.hpp b/include/boost/spirit/include/phoenix_function.hpp index 76c244d97..6ab828f53 100644 --- a/include/boost/spirit/include/phoenix_function.hpp +++ b/include/boost/spirit/include/phoenix_function.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_FUNCTION #define BOOST_SPIRIT_INCLUDE_PHOENIX_FUNCTION - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_fusion.hpp b/include/boost/spirit/include/phoenix_fusion.hpp index 8ab422a5b..4820ba8a5 100644 --- a/include/boost/spirit/include/phoenix_fusion.hpp +++ b/include/boost/spirit/include/phoenix_fusion.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_FUSION #define BOOST_SPIRIT_INCLUDE_PHOENIX_FUSION - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_limits.hpp b/include/boost/spirit/include/phoenix_limits.hpp index 3d9ed3a4e..93a1e1ef9 100644 --- a/include/boost/spirit/include/phoenix_limits.hpp +++ b/include/boost/spirit/include/phoenix_limits.hpp @@ -8,9 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_LIMITS #define BOOST_SPIRIT_INCLUDE_PHOENIX_LIMITS - -#ifdef BOOST_SPIRIT_USE_PHOENIX_V3 #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_object.hpp b/include/boost/spirit/include/phoenix_object.hpp index 5bb6dd469..43be44d2d 100644 --- a/include/boost/spirit/include/phoenix_object.hpp +++ b/include/boost/spirit/include/phoenix_object.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_OBJECT #define BOOST_SPIRIT_INCLUDE_PHOENIX_OBJECT - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_operator.hpp b/include/boost/spirit/include/phoenix_operator.hpp index 03c66c9d1..5ba692125 100644 --- a/include/boost/spirit/include/phoenix_operator.hpp +++ b/include/boost/spirit/include/phoenix_operator.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_OPERATOR #define BOOST_SPIRIT_INCLUDE_PHOENIX_OPERATOR - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_scope.hpp b/include/boost/spirit/include/phoenix_scope.hpp index c71533e90..6ab3d954e 100644 --- a/include/boost/spirit/include/phoenix_scope.hpp +++ b/include/boost/spirit/include/phoenix_scope.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_SCOPE #define BOOST_SPIRIT_INCLUDE_PHOENIX_SCOPE - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_statement.hpp b/include/boost/spirit/include/phoenix_statement.hpp index e6729b2ec..498b70fa8 100644 --- a/include/boost/spirit/include/phoenix_statement.hpp +++ b/include/boost/spirit/include/phoenix_statement.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_STATEMENT #define BOOST_SPIRIT_INCLUDE_PHOENIX_STATEMENT - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_stl.hpp b/include/boost/spirit/include/phoenix_stl.hpp index 63656357c..c60bfb421 100644 --- a/include/boost/spirit/include/phoenix_stl.hpp +++ b/include/boost/spirit/include/phoenix_stl.hpp @@ -8,11 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_STL #define BOOST_SPIRIT_INCLUDE_PHOENIX_STL - -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#include -#else #include #endif - -#endif diff --git a/include/boost/spirit/include/phoenix_version.hpp b/include/boost/spirit/include/phoenix_version.hpp index acc3fdf19..3d0327a1d 100644 --- a/include/boost/spirit/include/phoenix_version.hpp +++ b/include/boost/spirit/include/phoenix_version.hpp @@ -8,5 +8,5 @@ =============================================================================*/ #ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_VERSION #define BOOST_SPIRIT_INCLUDE_PHOENIX_VERSION -#include +#include #endif diff --git a/test/Jamfile b/test/Jamfile index 71fa77ef5..2ee8d6788 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -13,49 +13,35 @@ import testing ; import modules ; import feature ; -############################################################################### -# new feature definition allowing to switch between Phoenix V2 and V3 tests -feature.feature phoenix_v3 - : off on - : composite propagated - ; - -feature.compose on - : BOOST_SPIRIT_USE_PHOENIX_V3=1 - ; - ############################################################################### project spirit_v2x/test : requirements . - gcc:-ftemplate-depth-300 - darwin:-ftemplate-depth-300 + gcc:-ftemplate-depth-512 + darwin:-ftemplate-depth-512 + clang:-ftemplate-depth=512 : : ; -v2_tests = ; v3_tests = ; rule run ( sources + : args * : input-files * : requirements * : target-name ? : default-build * ) { target-name ?= $(sources[1]:D=:S=) ; - v2_tests += [ testing.run $(sources) : $(args) : $(input-files) : $(requirements) : $(target-name)-p2 : $(default-build) ] ; - v3_tests += [ testing.run $(sources) : $(args) : $(input-files) : $(requirements) on : $(target-name)-p3 : $(default-build) ] ; + v3_tests += [ testing.run $(sources) : $(args) : $(input-files) : $(requirements) : $(target-name)-p3 : $(default-build) ] ; } rule compile ( sources + : requirements * : target-name ? ) { target-name ?= $(sources[1]:D=:S=) ; - v2_tests += [ testing.compile $(sources) : $(requirements) : $(target-name)-p2 ] ; - v3_tests += [ testing.compile $(sources) : $(requirements) on : $(target-name)-p3 ] ; + v3_tests += [ testing.compile $(sources) : $(requirements) : $(target-name)-p3 ] ; } rule compile-fail ( sources + : requirements * : target-name ? ) { target-name ?= $(sources[1]:D=:S=) ; - v2_tests += [ testing.compile-fail $(sources) : $(requirements) : $(target-name)-p2 ] ; - v3_tests += [ testing.compile-fail $(sources) : $(requirements) on : $(target-name)-p3 ] ; + v3_tests += [ testing.compile-fail $(sources) : $(requirements) : $(target-name)-p3 ] ; } ############################################################################### @@ -287,15 +273,15 @@ path-constant LEX_DIR : $(BOOST_ROOT)/libs/spirit/test/lex ; [ run lex/regression_basic_lexer.cpp : : : : lex_regression_basic_lexer ] [ run lex/regression_matlib_dynamic.cpp : : : : lex_regression_matlib_dynamic ] [ run lex/regression_matlib_generate.cpp : $(LEX_DIR)/matlib_static.h : : : lex_regression_matlib_generate ] - [ run lex/regression_matlib_static.cpp : : : - on:.//lex_regression_matlib_generate-p3 - off:.//lex_regression_matlib_generate-p2 - : lex_regression_matlib_static ] +# [ run lex/regression_matlib_static.cpp : : : +# on:.//lex_regression_matlib_generate-p3 +# off:.//lex_regression_matlib_generate-p2 +# : lex_regression_matlib_static ] [ run lex/regression_matlib_generate_switch.cpp : $(LEX_DIR)/matlib_static_switch.h : : : lex_regression_matlib_generate_switch ] - [ run lex/regression_matlib_switch.cpp : : : - on:.//lex_regression_matlib_generate_switch-p3 - off:.//lex_regression_matlib_generate_switch-p2 - : lex_regression_matlib_switch ] +# [ run lex/regression_matlib_switch.cpp : : : +# on:.//lex_regression_matlib_generate_switch-p3 +# off:.//lex_regression_matlib_generate_switch-p2 +# : lex_regression_matlib_switch ] [ run lex/regression_word_count.cpp : : : : lex_regression_word_count ] [ run lex/regression_syntax_error.cpp : : : : lex_regression_syntax_error ] [ run lex/regression_wide.cpp : : : : lex_regression_wide ] @@ -327,19 +313,8 @@ path-constant LEX_DIR : $(BOOST_ROOT)/libs/spirit/test/lex ; ; } -# use this alias to build Spirit against Phoenix V2 -alias test_using_phoenix_v2 : $(v2_tests) ; - # use this alias to build Spirit against Phoenix V3 alias test_using_phoenix_v3 : $(v3_tests) ; -# We keep both aliases non-explicit to invoke tests for Phoenix V2 and V3 -# while running the regerssion tests. -# -# If you want to avoid running tests for both Phoenix V2 and V3 by default -# then simply uncomment the following 'explicit' command. If no target is -# specified, only the V2 tests will be run. -# - -explicit test_using_phoenix_v2 test_using_phoenix_v3 ; +explicit test_using_phoenix_v3 ; diff --git a/test/lex/regression_less_8563.cpp b/test/lex/regression_less_8563.cpp index 578178007..9e728682b 100644 --- a/test/lex/regression_less_8563.cpp +++ b/test/lex/regression_less_8563.cpp @@ -3,8 +3,6 @@ // 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) -#define BOOST_SPIRIT_USE_PHOENIX_V3 1 - #include #include diff --git a/test/qi/terminal_ex.cpp b/test/qi/terminal_ex.cpp index e857e84da..97d90457e 100644 --- a/test/qi/terminal_ex.cpp +++ b/test/qi/terminal_ex.cpp @@ -341,62 +341,6 @@ main() BOOST_TEST(test_attr("++---****/", IP4 >> '/', c) && c == 9); } -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 - - using boost::phoenix::val; - using boost::phoenix::actor; - using boost::phoenix::value; - - { // all lazy args - int c = 0; -#define LP1 ops(val(1)) - check_type_1 > >(LP1); - BOOST_TEST(test_attr("+/", LP1 >> '/', c) && c == 1); - - c = 0; -#define LP2 ops(val(1), val(4)) - check_type_2 >, actor > >(LP2); - BOOST_TEST(test_attr("+----/", LP2 >> '/', c) && c == 5); - - c = 0; -#define LP3 ops(val((char)2), val(3.), val(4)) - check_type_3 >, actor >, actor > >(LP3); - BOOST_TEST(!test("++---***/", LP3 >> '/')); -#define LP4 ops(val(1), val(2), val(3)) - check_type_3 >, actor >, actor > >(LP4); - BOOST_TEST(test_attr("+--***/", LP4 >> '/', c) && c == 6); - } - - { // mixed immediate and lazy args - namespace fusion = boost::fusion; - namespace phx = boost::phoenix; - - int c = 0; -#define MP1 ops(val(3), 2) - check_type_2 >, int>(MP1); - BOOST_TEST(test_attr("+++--/", MP1 >> '/', c) && c == 5); - - c = 0; -#define MP2 ops(4, val(1)) - check_type_2 > >(MP2); - BOOST_TEST(test_attr("++++-/", MP2 >> '/', c) && c == 5); - - c = 0; -#define MP3 ops(2, val(2), val(2)) - check_type_3 >, actor > >(MP3); - BOOST_TEST(!test("++-**/", MP3 >> '/')); -#define MP4 ops(2, val(2), 2) - check_type_3 >, int>(MP4); - BOOST_TEST(test_attr("++--**/", MP4 >> '/', c) && c == 6); - - c = 0; -#define MP5 ops(val(5) - val(3), 2, val(2)) - check_type_3, value > > >, int, actor > >(MP5); - BOOST_TEST(test_attr("++--**/", MP5 >> '/', c) && c == 6); - } - -#else // BOOST_SPIRIT_USE_PHOENIX_V3 - using boost::phoenix::val; using boost::phoenix::actor; using boost::phoenix::expression::value; @@ -448,7 +392,6 @@ main() check_type_3::type, value::type>::type, int, value::type>(MP5); BOOST_TEST(test_attr("++--**/", MP5 >> '/', c) && c == 6); } -#endif return boost::report_errors(); }