Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63522 - in sandbox/SOC/2010/phoenix3/boost/phoenix: core core/detail function function/detail object object/detail
From: thom.heller_at_[hidden]
Date: 2010-07-02 14:57:33


Author: theller
Date: 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
New Revision: 63522
URL: http://svn.boost.org/trac/boost/changeset/63522

Log:

+ some code clean up

Added:
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_operator.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_result_of.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/compose_ex.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/compose_result_of.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/make_basic_environment.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/function/detail/
   sandbox/SOC/2010/phoenix3/boost/phoenix/function/detail/function_operator.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/function/detail/function_result_of.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/construct.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/construct_eval.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new.hpp (contents, props changed)
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new_eval.hpp (contents, props changed)
Text files modified:
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp | 250 +++++++++++++++++++++++++++------------
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/compose.hpp | 81 ++++++++----
   sandbox/SOC/2010/phoenix3/boost/phoenix/core/environment.hpp | 28 ++--
   sandbox/SOC/2010/phoenix3/boost/phoenix/function/function.hpp | 107 ++++++++--------
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/construct.hpp | 84 +++++++-----
   sandbox/SOC/2010/phoenix3/boost/phoenix/object/new.hpp | 76 ++++++-----
   6 files changed, 386 insertions(+), 240 deletions(-)

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/actor.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -6,9 +6,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)
 ==============================================================================*/
-
-#if !PHOENIX_IS_ITERATING
-
 #ifndef PHOENIX_CORE_ACTOR_HPP
 #define PHOENIX_CORE_ACTOR_HPP
 
@@ -61,12 +58,32 @@
             type;
         };
 
-#define PHOENIX_ITERATION_PARAMS \
- (4, (1, PHOENIX_ACTOR_LIMIT, \
- <boost/phoenix/core/actor.hpp>, \
- PHOENIX_ITERATE_RESULT_OF))
-#include PHOENIX_ITERATE()
+ template <typename Expr, typename A0>
+ struct actor<Expr, A0>
+ : boost::result_of<eval_grammar(
+ ::boost::phoenix::actor<Expr> const &,
+ typename make_basic_environment<A0>::type&)
+ >
+ {};
+
+ template <typename Expr, typename A0, typename A1>
+ struct actor<Expr, A0, A1>
+ : boost::result_of<eval_grammar(
+ ::boost::phoenix::actor<Expr> const &,
+ typename make_basic_environment<A0, A1>::type&)
+ >
+ {};
+
+ template <typename Expr, typename A0, typename A1, typename A2>
+ struct actor<Expr, A0, A1, A2>
+ : boost::result_of<eval_grammar(
+ ::boost::phoenix::actor<Expr> const &,
+ typename make_basic_environment<A0, A1, A2>::type&)
+ >
+ {};
 
+ // Bring in the rest
+ #include <boost/phoenix/core/detail/actor_result_of.hpp>
     }
 
     ////////////////////////////////////////////////////////////////////////////
@@ -102,102 +119,179 @@
             return eval(this->proto_base(), args);
         }
 
-#define PHOENIX_ITERATION_PARAMS \
- (4, (1, PHOENIX_ACTOR_LIMIT, \
- <boost/phoenix/core/actor.hpp>, \
- PHOENIX_ITERATE_OPERATOR))
-#include PHOENIX_ITERATE()
+ template <typename This, typename A0>
+ struct result<This(A0)>
+ : result_of::actor<Expr, A0>
+ {};
 
- };
-}}
+ template <typename A0>
+ typename result_of::actor<Expr, A0&>::type
+ operator()(A0& a0) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0&>::type args(a0);
+
+ return eval(*this, args);
+ }
 
-namespace boost
-{
- // specialize boost::result_of to return the proper result type
- template <typename Expr>
- struct result_of<phoenix::actor<Expr>()>
- : phoenix::result_of::actor<Expr>
- {};
-
- template <typename Expr>
- struct result_of<phoenix::actor<Expr> const()>
- : result_of<phoenix::actor<Expr>()>
- {};
-}
+ template <typename A0>
+ typename result_of::actor<Expr, A0 const&>::type
+ operator()(A0 const& a0) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0 const&>::type args(a0);
+
+ return eval(*this, args);
+ }
 
-#endif
+ template <typename This, typename A0, typename A1>
+ struct result<This(A0&, A1&)>
+ : result_of::actor<Expr, A0, A1>
+ {};
 
-#else
+ template <typename A0, typename A1>
+ typename result_of::actor<Expr, A0&, A1&>::type
+ operator()(A0& a0, A1& a1) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0&, A1&>::type args(a0, a1);
+
+ return eval(*this, args);
+ }
 
-#define PHOENIX_ENV( A ) typename make_basic_environment<A>::type
+ template <typename A0, typename A1>
+ typename result_of::actor<Expr, A0&, A1 const&>::type
+ operator()(A0& a0, A1 const& a1) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0&, A1 const&>::type args(a0, a1);
+
+ return eval(*this, args);
+ }
 
-#if BOOST_PP_ITERATION_FLAGS() == PHOENIX_ITERATE_RESULT_OF
-
- template <typename Expr, PHOENIX_typename_A>
- struct actor<Expr, BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, A)>
- : boost::result_of<eval_grammar(
- ::boost::phoenix::actor<Expr> const &,
- PHOENIX_ENV(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, A))&)>
- {};
+ template <typename A0, typename A1>
+ typename result_of::actor<Expr, A0 const&, A1&>::type
+ operator()(A0 const& a0, A1& a1) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0 const&, A1&>::type args(a0, a1);
+
+ return eval(*this, args);
+ }
 
-#elif BOOST_PP_ITERATION_FLAGS() == PHOENIX_ITERATE_OPERATOR
+ template <typename A0, typename A1>
+ typename result_of::actor<Expr, A0 const&, A1 const&>::type
+ operator()(A0 const& a0, A1 const& a1) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0&, A1&>::type args(a0, a1);
+
+ return eval(this->proto_base(), args);
+ }
 
- template <typename This, PHOENIX_typename_A>
- struct result<This(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, A))>
- : result_of::actor<Expr, BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, A)>
+ template <typename This, typename A0, typename A1, typename A2>
+ struct result<This(A0, A1, A2)>
+ : result_of::actor<Expr, A0, A1, A2>
         {};
 
-#if PHOENIX_ITERATION >= PHOENIX_PERFECT_FORWARD_LIMIT
-
- template <PHOENIX_typename_A>
- typename result_of::actor<Expr, PHOENIX_A_ref>::type
- operator()(PHOENIX_A_ref_a) const
+ template <typename A0, typename A1, typename A2>
+ typename result_of::actor<Expr, A0&, A1&, A2&>::type
+ operator()(A0& a0, A1& a1, A2& a2) const
         {
- BOOST_PROTO_ASSERT_MATCHES(*this, eval_grammar);
- PHOENIX_ENV(PHOENIX_A_ref) args( PHOENIX_a);
-
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0&, A1&, A2&>::type args(a0, a1, a2);
+
             return eval(*this, args);
         }
 
- template <PHOENIX_typename_A>
- typename result_of::actor<Expr, PHOENIX_A_const_ref>::type
- operator()(PHOENIX_A_const_ref_a) const
+ template <typename A0, typename A1, typename A2>
+ typename result_of::actor<Expr, A0 const&, A1&, A2&>::type
+ operator()(A0 const& a0, A1& a1, A2& a2) const
         {
- BOOST_PROTO_ASSERT_MATCHES(*this, eval_grammar);
- PHOENIX_ENV(PHOENIX_A_const_ref) args( PHOENIX_a);
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0 const&, A1&, A2&>::type args(a0, a1, a2);
+
+ return eval(*this, args);
+ }
 
+ template <typename A0, typename A1, typename A2>
+ typename result_of::actor<Expr, A0&, A1 const&, A2&>::type
+ operator()(A0& a0, A1 const& a1, A2& a2) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0&, A1 const&, A2&>::type args(a0, a1, a2);
+
             return eval(*this, args);
         }
 
-#else
+ template <typename A0, typename A1, typename A2>
+ typename result_of::actor<Expr, A0&, A1&, A2 const&>::type
+ operator()(A0& a0, A1& a1, A2 const& a2) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0&, A1&, A2 const&>::type args(a0, a1, a2);
+
+ return eval(*this, args);
+ }
 
-// We need to define operator() for all permutations of reference types.
-// For PHOENIX_ITERATION <= PHOENIX_LIMIT_PREFECT_FORWARD
-// 2^PHOENIX_ITERATION overloads are created
-// For compile time reasons,
-// if PHOENIX_ITERATION > PHOENIX_LIMIT_PERFECT_FORWARD
-// only operator()(A const &...a) and operator()(A &...a) are generated
-// this is all handled by the PP mumbo jumbo above
-#define PHOENIX_ACTOR_OPERATOR(_, I, __) \
- template <PHOENIX_typename_A> \
- typename result_of::actor<Expr, PHOENIX_PERM_A(I)>::type \
- operator()(PHOENIX_PERM_A_a(I)) const \
- { \
- BOOST_PROTO_ASSERT_MATCHES(*this, eval_grammar); \
- PHOENIX_ENV(PHOENIX_PERM_A(I)) args(PHOENIX_a); \
- \
- return eval(*this, args); \
+ template <typename A0, typename A1, typename A2>
+ typename result_of::actor<Expr, A0 const&, A1 const&, A2&>::type
+ operator()(A0 const& a0, A1 const& a1, A2& a2) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0 const&, A1 const&, A2&>::type args(a0, a1, a2);
+
+ return eval(*this, args);
         }
 
- BOOST_PP_REPEAT( PHOENIX_PERM_SIZE, PHOENIX_ACTOR_OPERATOR, _)
+ template <typename A0, typename A1, typename A2>
+ typename result_of::actor<Expr, A0&, A1 const&, A2 const&>::type
+ operator()(A0& a0, A1 const& a1, A2 const& a2) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0&, A1 const&, A2 const&>::type args(a0, a1, a2);
+
+ return eval(*this, args);
+ }
 
-#undef PHOENIX_ACTOR_OPERATOR
+ template <typename A0, typename A1, typename A2>
+ typename result_of::actor<Expr, A0 const&, A1&, A2 const&>::type
+ operator()(A0 const& a0, A1& a1, A2 const& a2) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0 const&, A1&, A2 const&>::type args(a0, a1, a2);
+
+ return eval(*this, args);
+ }
 
-#endif
+ template <typename A0, typename A1, typename A2>
+ typename result_of::actor<Expr, A0 const&, A1 const&, A2 const&>::type
+ operator()(A0 const& a0, A1 const& a1, A2 const& a2) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES( *this, eval_grammar );
+ typename make_basic_environment<A0 const&, A1 const&, A2 const&>::type args(a0, a1, a2);
+
+ return eval(*this, args);
+ }
 
-#endif
+ // Bring in the rest
+ #include <boost/phoenix/core/detail/actor_operator.hpp>
+ };
+}}
 
-#undef PHOENIX_ENV
+namespace boost
+{
+ // specialize boost::result_of to return the proper result type
+ template <typename Expr>
+ struct result_of<phoenix::actor<Expr>()>
+ : phoenix::result_of::actor<Expr>
+ {};
+
+ template <typename Expr>
+ struct result_of<phoenix::actor<Expr> const()>
+ : result_of<phoenix::actor<Expr>()>
+ {};
+}
 
 #endif
 

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/compose.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/compose.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/compose.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -5,9 +5,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)
 ==============================================================================*/
-
-#if !PHOENIX_IS_ITERATING
-
 #ifndef PHOENIX_CORE_COMPOSE_HPP
 #define PHOENIX_CORE_COMPOSE_HPP
 
@@ -66,19 +63,53 @@
         }
     };
 
-#define PHOENIX_ITERATION_PARAMS \
- (3, (1, PHOENIX_COMPOSITE_LIMIT, \
- <boost/phoenix/core/compose.hpp>))
-#include PHOENIX_ITERATE()
+ template <typename F, template<typename> class Actor, typename A0>
+ struct compose_ex<F, Actor, A0>
+ {
+ typedef
+ typename proto::result_of::make_expr<
+ proto::tag::function
+ , default_domain_with_basic_expr
+ , funcwrap<F>
+ , env
+ , A0>::type
+ base_type;
+ typedef Actor<base_type> result_type;
+ typedef result_type type;
 
-}}
+ result_type const
+ operator()(typename call_traits<A0>::param_type a0) const
+ {
+ actor<base_type> const e = {{{funcwrap<F>()}, {env()}, a0}};
+ return e;
+ }
+ };
 
-#endif
+ template <typename F, template<typename> class Actor, typename A0, typename A1>
+ struct compose_ex<F, Actor, A0, A1>
+ {
+ typedef
+ typename proto::result_of::make_expr<
+ proto::tag::function
+ , default_domain_with_basic_expr
+ , funcwrap<F>
+ , env
+ , A0
+ , A1>::type
+ base_type;
+ typedef Actor<base_type> result_type;
+ typedef result_type type;
 
-#else
+ result_type const
+ operator()(typename call_traits<A0>::param_type a0,typename call_traits<A1>::param_type a1) const
+ {
+ actor<base_type> const e = {{{funcwrap<F>()}, {env()}, a0, a1}};
+ return e;
+ }
+ };
 
- template <typename F, template<typename> class Actor, PHOENIX_typename_A>
- struct compose_ex<F, Actor, PHOENIX_A>
+ template <typename F, template<typename> class Actor, typename A0, typename A1, typename A2>
+ struct compose_ex<F, Actor, A0, A1, A2>
     {
         typedef
             typename proto::result_of::make_expr<
@@ -86,28 +117,28 @@
                 , default_domain_with_basic_expr
                 , funcwrap<F>
                 , env
- , PHOENIX_A>::type
+ , A0
+ , A1
+ , A2>::type
             base_type;
         typedef Actor<base_type> result_type;
         typedef result_type type;
 
         result_type const
         operator()(
- BOOST_PP_ENUM_BINARY_PARAMS(
- PHOENIX_ITERATION,
- typename call_traits< A, >::param_type a)) const
+ typename call_traits<A0>::param_type a0,
+ typename call_traits<A1>::param_type a1,
+ typename call_traits<A2>::param_type a2) const
         {
-#if PHOENIX_ITERATION == 1
- // silence gcc warnings
- //actor<base_type> const e = {{{funcwrap<F>()}, {env()}, {a0}}};
- actor<base_type> const e = {{{funcwrap<F>()}, {env()}, a0}};
-#elif PHOENIX_ITERATION == 2
- actor<base_type> const e = {{{funcwrap<F>()}, {env()}, a0, a1}};
-#else
- actor<base_type> const e = {{{funcwrap<F>()}, {env()}, PHOENIX_a}};
-#endif
+ actor<base_type> const e = {{{funcwrap<F>()}, {env()}, a0, a1, a2}};
             return e;
         }
     };
 
+ // Bring in the rest
+ #include <boost/phoenix/core/detail/compose_ex.hpp>
+
+}}
+
 #endif
+

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_operator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_operator.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,82 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_CORE_DETAIL_ACTOR_OPERATOR_HPP
+#define PHOENIX_CORE_DETAIL_ACTOR_OPERATOR_HPP
+
+#include <boost/phoenix/support/iterate.hpp>
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_ACTOR_LIMIT, \
+ <boost/phoenix/core/detail/actor_operator.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+#define PHOENIX_ENV( A ) typename make_basic_environment<A>::type
+
+ template <typename This, PHOENIX_typename_A>
+ struct result<This(PHOENIX_A)>
+ : result_of::actor<Expr, PHOENIX_A>
+ {};
+
+#if PHOENIX_ITERATION >= PHOENIX_PERFECT_FORWARD_LIMIT
+
+ template <PHOENIX_typename_A>
+ typename result_of::actor<Expr, PHOENIX_A_ref>::type
+ operator()(PHOENIX_A_ref_a) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES(*this, eval_grammar);
+ PHOENIX_ENV(PHOENIX_A_ref) args( PHOENIX_a);
+
+ return eval(*this, args);
+ }
+
+ template <PHOENIX_typename_A>
+ typename result_of::actor<Expr, PHOENIX_A_const_ref>::type
+ operator()(PHOENIX_A_const_ref_a) const
+ {
+ BOOST_PROTO_ASSERT_MATCHES(*this, eval_grammar);
+ PHOENIX_ENV(PHOENIX_A_const_ref) args( PHOENIX_a);
+
+ return eval(*this, args);
+ }
+
+#else
+
+// We need to define operator() for all permutations of reference types.
+// For PHOENIX_ITERATION <= PHOENIX_LIMIT_PREFECT_FORWARD
+// 2^PHOENIX_ITERATION overloads are created
+// For compile time reasons,
+// if PHOENIX_ITERATION > PHOENIX_LIMIT_PERFECT_FORWARD
+// only operator()(A const &...a) and operator()(A &...a) are generated
+// this is all handled by the PP mumbo jumbo above
+#define PHOENIX_ACTOR_OPERATOR(_, I, __) \
+ template <PHOENIX_typename_A> \
+ typename result_of::actor<Expr, PHOENIX_PERM_A(I)>::type \
+ operator()(PHOENIX_PERM_A_a(I)) const \
+ { \
+ BOOST_PROTO_ASSERT_MATCHES(*this, eval_grammar); \
+ PHOENIX_ENV(PHOENIX_PERM_A(I)) args(PHOENIX_a); \
+ \
+ return eval(*this, args); \
+ }
+
+ BOOST_PP_REPEAT( PHOENIX_PERM_SIZE, PHOENIX_ACTOR_OPERATOR, _)
+
+#undef PHOENIX_ACTOR_OPERATOR
+
+#endif
+
+#undef PHOENIX_ENV
+
+#endif

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/actor_result_of.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,37 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_CORE_DETAIL_ACTOR_RESULT_OF_HPP
+#define PHOENIX_CORE_DETAIL_ACTOR_RESULT_OF_HPP
+
+#include <boost/phoenix/support/iterate.hpp>
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_ACTOR_LIMIT, \
+ <boost/phoenix/core/detail/actor_result_of.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+#define PHOENIX_ENV( A ) typename make_basic_environment<A>::type
+
+ template <typename Expr, PHOENIX_typename_A>
+ struct actor<Expr, BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, A)>
+ : boost::result_of<eval_grammar(
+ ::boost::phoenix::actor<Expr> const &,
+ PHOENIX_ENV(PHOENIX_A)&)>
+ {};
+
+#undef PHOENIX_ENV
+
+#endif
+

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/compose_ex.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/compose_ex.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,50 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_CORE_DETAIL_COMPOSE_RESULT_OF_HPP
+#define PHOENIX_CORE_DETAIL_COMPOSE_RESULT_OF_HPP
+
+#include <boost/phoenix/support/iterate.hpp>
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_COMPOSITE_LIMIT, \
+ <boost/phoenix/core/detail/compose_ex.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <typename F, template<typename> class Actor, PHOENIX_typename_A>
+ struct compose_ex<F, Actor, PHOENIX_A>
+ {
+ typedef
+ typename proto::result_of::make_expr<
+ proto::tag::function
+ , default_domain_with_basic_expr
+ , funcwrap<F>
+ , env
+ , PHOENIX_A>::type
+ base_type;
+ typedef Actor<base_type> result_type;
+ typedef result_type type;
+
+ result_type const
+ operator()(
+ BOOST_PP_ENUM_BINARY_PARAMS(
+ PHOENIX_ITERATION,
+ typename call_traits< A, >::param_type a)) const
+ {
+ actor<base_type> const e = {{{funcwrap<F>()}, {env()}, PHOENIX_a}};
+ return e;
+ }
+ };
+
+#endif

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/compose_result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/compose_result_of.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,58 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_CORE_DETAIL_COMPOSE_RESULT_OF_HPP
+#define PHOENIX_CORE_DETAIL_COMPOSE_RESULT_OF_HPP
+
+#include <boost/phoenix/support/iterate.hpp>
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (1, PHOENIX_COMPOSITE_LIMIT, \
+ <boost/phoenix/core/detail/compose_ex.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <typename F, template<typename> class Actor, PHOENIX_typename_A>
+ struct compose_ex<F, Actor, PHOENIX_A>
+ {
+ typedef
+ typename proto::result_of::make_expr<
+ proto::tag::function
+ , default_domain_with_basic_expr
+ , funcwrap<F>
+ , env
+ , PHOENIX_A>::type
+ base_type;
+ typedef Actor<base_type> result_type;
+ typedef result_type type;
+
+ result_type const
+ operator()(
+ BOOST_PP_ENUM_BINARY_PARAMS(
+ PHOENIX_ITERATION,
+ typename call_traits< A, >::param_type a)) const
+ {
+#if PHOENIX_ITERATION == 1
+ // silence gcc warnings
+ //actor<base_type> const e = {{{funcwrap<F>()}, {env()}, {a0}}};
+ actor<base_type> const e = {{{funcwrap<F>()}, {env()}, a0}};
+#elif PHOENIX_ITERATION == 2
+ actor<base_type> const e = {{{funcwrap<F>()}, {env()}, a0, a1}};
+#else
+ actor<base_type> const e = {{{funcwrap<F>()}, {env()}, PHOENIX_a}};
+#endif
+ return e;
+ }
+ };
+
+#endif

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/make_basic_environment.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/detail/make_basic_environment.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,28 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_CORE_DETAIL_MAKE_BASIC_ENVIRONMENT_HPP
+#define PHOENIX_CORE_DETAIL_MAKE_BASIC_ENVIRONMENT_HPP
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_ARG_LIMIT, \
+ <boost/phoenix/core/detail/make_basic_environment.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <PHOENIX_typename_A>
+ struct make_basic_environment<PHOENIX_A>
+ : mpl::identity<
+ BOOST_PP_CAT(fusion::vector, PHOENIX_ITERATION)<PHOENIX_A> > {};
+
+#endif

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/core/environment.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/core/environment.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/core/environment.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -4,9 +4,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)
 ==============================================================================*/
-
-#if !PHOENIX_IS_ITERATING
-
 #ifndef PHOENIX_CORE_ENVIRONMENT_HPP
 #define PHOENIX_CORE_ENVIRONMENT_HPP
 
@@ -53,20 +50,21 @@
     struct make_basic_environment<>
         : mpl::identity<fusion::vector0<> > {};
 
-#define PHOENIX_ITERATION_PARAMS \
- (3, (1, PHOENIX_ARG_LIMIT, \
- <boost/phoenix/core/environment.hpp>))
-#include PHOENIX_ITERATE()
+ template <typename A0>
+ struct make_basic_environment<A0>
+ : mpl::identity<fusion::vector1<A0> > {};
+
+ template <typename A0, typename A1>
+ struct make_basic_environment<A0, A1>
+ : mpl::identity<fusion::vector2<A0, A1> > {};
+
+ template <typename A0, typename A1, typename A2>
+ struct make_basic_environment<A0, A1, A2>
+ : mpl::identity<fusion::vector3<A0, A1, A2> > {};
 
+ // Bring in the rest
+ #include <boost/phoenix/core/detail/make_basic_environment.hpp>
 }}
 
 #endif
 
-#else
-
- template <PHOENIX_typename_A>
- struct make_basic_environment<PHOENIX_A>
- : mpl::identity<
- BOOST_PP_CAT(fusion::vector, PHOENIX_ITERATION)<PHOENIX_A> > {};
-
-#endif

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/function/detail/function_operator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/function/detail/function_operator.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,36 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_FUNCTION_DETAIL_FUNCTION_OPERATOR_HPP
+#define PHOENIX_FUNCTION_DETAIL_FUNCTION_OPERATOR_HPP
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_ACTOR_LIMIT, \
+ <boost/phoenix/function/detail/function_operator.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <typename This, PHOENIX_typename_A>
+ struct result<This(PHOENIX_A_const_ref)>
+ : result_of::function<F, PHOENIX_A>
+ {};
+
+ template <PHOENIX_typename_A>
+ typename result_of::function<F, PHOENIX_A>::type const
+ operator()(PHOENIX_A_const_ref_a) const
+ {
+ return proto::make_expr<
+ proto::tag::function, phoenix_domain>(f, PHOENIX_a);
+ }
+
+#endif

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/function/detail/function_result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/function/detail/function_result_of.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,32 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_FUNCTION_DETAIL_FUNCTION_RESULT_OF_HPP
+#define PHOENIX_FUNCTION_DETAIL_FUNCTION_RESULT_OF_HPP
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_ACTOR_LIMIT, \
+ <boost/phoenix/function/detail/function_result_of.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <typename F, PHOENIX_typename_A>
+ struct function<F, PHOENIX_A>
+ : proto::result_of::make_expr<
+ proto::tag::function
+ , phoenix_domain
+ , F
+ , PHOENIX_A>
+ {};
+
+#endif

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/function/function.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/function/function.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/function/function.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -5,9 +5,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)
 ==============================================================================*/
-
-#if !PHOENIX_IS_ITERATING
-
 #ifndef PHOENIX_FUNCTION_FUNCTION_HPP
 #define PHOENIX_FUNCTION_FUNCTION_HPP
 
@@ -40,13 +37,31 @@
               , F>
         {};
 
-#define PHOENIX_ITERATE_RESULT_OF 1
-#define PHOENIX_ITERATION_PARAMS \
- (4, (1, PHOENIX_ACTOR_LIMIT, \
- <boost/phoenix/function/function.hpp>, PHOENIX_ITERATE_RESULT_OF))
-#include PHOENIX_ITERATE()
-#undef PHOENIX_ITERATE_RESULT_OF
+ template <typename F, typename A0>
+ struct function<F, A0>
+ : proto::result_of::make_expr<
+ proto::tag::function
+ , phoenix_domain
+ , F, A0>
+ {};
+
+ template <typename F, typename A0, typename A1>
+ struct function<F, A0, A1>
+ : proto::result_of::make_expr<
+ proto::tag::function
+ , phoenix_domain
+ , F, A0, A1>
+ {};
 
+ template <typename F, typename A0, typename A1, typename A2>
+ struct function<F, A0, A1, A2>
+ : proto::result_of::make_expr<
+ proto::tag::function
+ , phoenix_domain
+ , F, A0, A1, A2>
+ {};
+
+ #include <boost/phoenix/function/detail/function_result_of.hpp>
     }
 
     // functor which returns our lazy function call extension
@@ -59,26 +74,45 @@
           : f(f)
         {}
 
- template<typename Sig>
+ template <typename Sig>
         struct result;
 
- template<typename This>
- struct result<This()>
- : result_of::function<F>
- {};
-
         typename result_of::function<F>::type const
         operator()() const
         {
             return proto::make_expr<proto::tag::function, phoenix_domain>(f);
         }
+
+ template <typename This, typename A0>
+ struct result<This(A0 const&)>
+ : result_of::function<F, A0>
+ {};
+
+ template <typename A0>
+ typename result_of::function<F, A0>::type const
+ operator()(A0 const& a0) const
+ {
+ return proto::make_expr<
+ proto::tag::function, phoenix_domain>(f, a0);
+ }
+
+ template <typename A0, typename A1>
+ typename result_of::function<F, A0, A1>::type const
+ operator()(A0 const& a0, A1 const& a1) const
+ {
+ return proto::make_expr<
+ proto::tag::function, phoenix_domain>(f, a0, a1);
+ }
 
-#define PHOENIX_ITERATE_OPERATOR 2
-#define PHOENIX_ITERATION_PARAMS \
- (4, (1, PHOENIX_ACTOR_LIMIT, \
- <boost/phoenix/function/function.hpp>, PHOENIX_ITERATE_OPERATOR))
-#include PHOENIX_ITERATE()
-#undef PHOENIX_ITERATE_OPERATOR
+ template <typename A0, typename A1, typename A2>
+ typename result_of::function<F, A0, A1, A2>::type const
+ operator()(A0 const& a0, A1 const& a1, A2 const& a2) const
+ {
+ return proto::make_expr<
+ proto::tag::function, phoenix_domain>(f, a0, a1, a2);
+ }
+
+ #include <boost/phoenix/function/detail/function_operator.hpp>
 
         F f;
     };
@@ -94,34 +128,3 @@
 
 #endif
 
-#else
-
-#if BOOST_PP_ITERATION_FLAGS() == PHOENIX_ITERATE_RESULT_OF
-
- template <typename F, PHOENIX_typename_A>
- struct function<F, PHOENIX_A>
- : proto::result_of::make_expr<
- proto::tag::function
- , phoenix_domain
- , F
- , PHOENIX_A>
- {};
-
-#elif BOOST_PP_ITERATION_FLAGS() == PHOENIX_ITERATE_OPERATOR
-
- template<typename This, PHOENIX_typename_A>
- struct result<This(PHOENIX_A_const_ref)>
- : result_of::function<F, PHOENIX_A>
- {};
-
- template< PHOENIX_typename_A>
- typename result_of::function<F, PHOENIX_A>::type const
- operator()(PHOENIX_A_const_ref_a) const
- {
- return proto::make_expr<
- proto::tag::function, phoenix_domain>(f, PHOENIX_a);
- }
-
-#endif
-
-#endif

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/object/construct.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/object/construct.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/object/construct.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -5,9 +5,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)
 ==============================================================================*/
-
-#if !PHOENIX_IS_ITERATING
-
 #ifndef PHOENIX_OBJECT_CONSTRUCT_HPP
 #define PHOENIX_OBJECT_CONSTRUCT_HPP
 
@@ -36,15 +33,35 @@
             return T();
         }
 
-#define PHOENIX_ITERATION_PARAMS \
- (4, (1, PHOENIX_COMPOSITE_LIMIT, \
- <boost/phoenix/object/construct.hpp>, \
- PHOENIX_ITERATE_OPERATOR))
-#include PHOENIX_ITERATE()
+ template <typename Env, typename A0>
+ result_type
+ operator()(Env& env, A0 const& a0) const
+ {
+ return T(eval(a0, env));
+ }
+
+ template <typename Env, typename A0, typename A1>
+ result_type
+ operator()(Env& env, A0 const& a0, A1 const& a1) const
+ {
+ return T(eval(a0, env), eval(a1, env));
+ }
+
+ template <typename Env, typename A0, typename A1, typename A2>
+ result_type
+ operator()(Env& env, A0 const& a0, A1 const& a1, A2 const& a2) const
+ {
+ return T(eval(a0, env), eval(a1, env), eval(a2, env));
+ }
+
+ // Bring in the rest
+ #include <boost/phoenix/object/detail/construct_eval.hpp>
+
     };
 
     template <typename T, PHOENIX_typename_A_void(PHOENIX_COMPOSITE_LIMIT)>
- struct make_construct : compose<construct_eval<T>, PHOENIX_A(PHOENIX_COMPOSITE_LIMIT)>
+ struct make_construct
+ : compose<construct_eval<T>, PHOENIX_A(PHOENIX_COMPOSITE_LIMIT)>
     {};
 
     template <typename T>
@@ -54,38 +71,31 @@
         make_construct<T>()();
     }
 
-#define PHOENIX_ITERATION_PARAMS \
- (3, (1, PHOENIX_COMPOSITE_LIMIT, \
- <boost/phoenix/object/construct.hpp>))
-#include PHOENIX_ITERATE()
-}}
-
-#endif
-
-#else
-
-#if BOOST_PP_ITERATION_FLAGS() == PHOENIX_ITERATE_OPERATOR
-
- template <typename Env, PHOENIX_typename_A>
- result_type
- operator()(Env& env, PHOENIX_A_const_ref_a) const
- {
-#define EVAL_a(_,n,__) \
- BOOST_PP_COMMA_IF(n) eval(a ## n, env)
-
- return T(BOOST_PP_REPEAT(PHOENIX_ITERATION, EVAL_a, _));
-#undef EVAL_a
- }
+ template <typename T, typename A0>
+ typename make_construct<T, A0>::type const
+ construct(A0 const& a0)
+ {
+ return make_construct<T, A0>()(a0);
+ }
 
-#else
+ template <typename T, typename A0, typename A1>
+ typename make_construct<T, A0, A1>::type const
+ construct(A0 const& a0, A1 const& a1)
+ {
+ return make_construct<T, A0, A1>()(a0, a1);
+ }
 
- template <typename T, PHOENIX_typename_A>
- typename make_construct<T, PHOENIX_A>::type const
- construct(PHOENIX_A_const_ref_a)
+ template <typename T, typename A0, typename A1, typename A2>
+ typename make_construct<T, A0, A1, A2>::type const
+ construct(A0 const& a0, A1 const& a1, A2 const& a2)
     {
- return make_construct<T, PHOENIX_A>()(PHOENIX_a);
+ return make_construct<T, A0, A1, A2>()(a0, a1, a2);
     }
+
+ // Bring in the rest
+ #include <boost/phoenix/object/detail/construct.hpp>
 
-#endif
+}}
 
 #endif
+

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/construct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/construct.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,30 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_OBJECT_DETAIL_CONSTRUCT_HPP
+#define PHOENIX_OBJECT_DETAIL_CONSTRUCT_HPP
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_COMPOSITE_LIMIT, \
+ <boost/phoenix/object/detail/construct.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <typename T, PHOENIX_typename_A>
+ typename make_construct<T, PHOENIX_A>::type const
+ construct(PHOENIX_A_const_ref_a)
+ {
+ return make_construct<T, PHOENIX_A>()(PHOENIX_a);
+ }
+
+#endif

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/construct_eval.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/construct_eval.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,34 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_OBJECT_DETAIL_CONSTRUCT_EVAL_HPP
+#define PHOENIX_OBJECT_DETAIL_CONSTRUCT_EVAL_HPP
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_COMPOSITE_LIMIT, \
+ <boost/phoenix/object/detail/construct_eval.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <typename Env, PHOENIX_typename_A>
+ result_type
+ operator()(Env& env, PHOENIX_A_const_ref_a) const
+ {
+#define EVAL_a(_,n,__) \
+ BOOST_PP_COMMA_IF(n) eval(a ## n, env)
+
+ return T(BOOST_PP_REPEAT(PHOENIX_ITERATION, EVAL_a, _));
+#undef EVAL_a
+ }
+
+#endif

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,31 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_OBJECT_DETAIL_NEW_HPP
+#define PHOENIX_OBJECT_DETAIL_NEW_HPP
+
+#define PHOENIX_ITERATION_PARAMS \
+ (3, (4, PHOENIX_COMPOSITE_LIMIT, \
+ <boost/phoenix/object/new.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <typename T, PHOENIX_typename_A>
+ typename make_new<T, PHOENIX_A>::type const
+ new_(PHOENIX_A_const_ref_a)
+ {
+ return make_new<T, PHOENIX_A>()(PHOENIX_a);
+ }
+
+#endif
+

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new_eval.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/object/detail/new_eval.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -0,0 +1,34 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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 !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_OBJECT_DETAIL_NEW_EVAL_HPP
+#define PHOENIX_OBJECT_DETAIL_NEW_EVAL_HPP
+
+#define PHOENIX_ITERATION_PARAMS \
+ (4, (4, PHOENIX_COMPOSITE_LIMIT, \
+ <boost/phoenix/object/detail/new_eval.hpp>))
+#include PHOENIX_ITERATE()
+
+#endif
+
+#else
+
+ template <typename Env, PHOENIX_typename_A>
+ result_type
+ operator()(Env& env, PHOENIX_A_const_ref_a) const
+ {
+#define EVAL_a(_,n,__) \
+ BOOST_PP_COMMA_IF(n) eval(a ## n, env)
+
+ return new T(BOOST_PP_REPEAT(PHOENIX_ITERATION, EVAL_a, _));
+#undef EVAL_a
+ }
+
+#endif

Modified: sandbox/SOC/2010/phoenix3/boost/phoenix/object/new.hpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/boost/phoenix/object/new.hpp (original)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/object/new.hpp 2010-07-02 08:52:26 EDT (Fri, 02 Jul 2010)
@@ -36,11 +36,29 @@
             return new T;
         }
 
-#define PHOENIX_ITERATION_PARAMS \
- (4, (1, PHOENIX_COMPOSITE_LIMIT, \
- <boost/phoenix/object/new.hpp>, \
- PHOENIX_ITERATE_OPERATOR))
-#include PHOENIX_ITERATE()
+ template <typename Env, typename A0>
+ result_type
+ operator()(Env& env, A0 const& a0) const
+ {
+ return new T(eval(a0, env));
+ }
+
+ template <typename Env, typename A0, typename A1>
+ result_type
+ operator()(Env& env, A0 const& a0, A1 const& a1) const
+ {
+ return new T(eval(a0, env), eval(a1, env));
+ }
+
+ template <typename Env, typename A0, typename A1, typename A2>
+ result_type
+ operator()(Env& env, A0 const& a0, A1 const& a1, A2 const& a2) const
+ {
+ return new T(eval(a0, env), eval(a1, env), eval(a2, env));
+ }
+
+ // Bring in the rest
+ #include <boost/phoenix/object/detail/new_eval.hpp>
     };
 
     template <typename T, PHOENIX_typename_A_void(PHOENIX_COMPOSITE_LIMIT)>
@@ -54,38 +72,30 @@
         make_new<T>()();
     }
 
-#define PHOENIX_ITERATION_PARAMS \
- (3, (1, PHOENIX_COMPOSITE_LIMIT, \
- <boost/phoenix/object/new.hpp>))
-#include PHOENIX_ITERATE()
-}}
-
-#endif
-
-#else
-
-#if BOOST_PP_ITERATION_FLAGS() == PHOENIX_ITERATE_OPERATOR
-
- template <typename Env, PHOENIX_typename_A>
- result_type
- operator()(Env& env, PHOENIX_A_const_ref_a) const
- {
-#define EVAL_a(_,n,__) \
- BOOST_PP_COMMA_IF(n) eval(a ## n, env)
-
- return new T(BOOST_PP_REPEAT(PHOENIX_ITERATION, EVAL_a, _));
-#undef EVAL_a
- }
+ template <typename T, typename A0>
+ typename make_new<T, A0>::type const
+ new_(A0 const& a0)
+ {
+ make_new<T, A0>()(a0);
+ }
 
-#else
+ template <typename T, typename A0, typename A1>
+ typename make_new<T, A0, A1>::type const
+ new_(A0 const& a0, A1 const& a1)
+ {
+ make_new<T, A0>()(a0, a1);
+ }
 
- template <typename T, PHOENIX_typename_A>
- typename make_new<T, PHOENIX_A>::type const
- new_(PHOENIX_A_const_ref_a)
+ template <typename T, typename A0, typename A1, typename A2>
+ typename make_new<T, A0, A1, A2>::type const
+ new_(A0 const& a0, A1 const& a1, A2 const& a2)
     {
- return make_new<T, PHOENIX_A>()(PHOENIX_a);
+ make_new<T, A0>()(a0, a1, a2);
     }
 
-#endif
+ // Bring in the rest
+ #include <boost/phoenix/object/detail/new.hpp>
+}}
 
 #endif
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk