diff --git a/include/boost/phoenix/core/actor.hpp b/include/boost/phoenix/core/actor.hpp index 9a8d7eb..ab3a69e 100644 --- a/include/boost/phoenix/core/actor.hpp +++ b/include/boost/phoenix/core/actor.hpp @@ -2,6 +2,7 @@ Copyright (c) 2005-2010 Joel de Guzman Copyright (c) 2010 Eric Niebler Copyright (c) 2010 Thomas Heller + Copyright (c) 2014 John Fletcher 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) @@ -30,8 +31,7 @@ #pragma warning(push) #pragma warning(disable: 4522) // 'this' used in base member initializer list #pragma warning(disable: 4510) // default constructor could not be generated -#pragma warning(disable: 4610) // can never be instantiated - user defined constructor required -#endif +#pragma warning(disable: 4610) // can never be instantiated - user defined const#endif namespace boost { namespace phoenix { @@ -83,7 +83,7 @@ namespace boost { namespace phoenix } }; - #define BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(Z, N, D) \ + #define BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(N) \ assign( \ proto::_child_c \ , proto::call< \ @@ -91,21 +91,35 @@ namespace boost { namespace phoenix > \ ) \ /**/ - #define BOOST_PHOENIX_ACTOR_ASSIGN_CALL(Z, N, D) \ - proto::when< \ + #define BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD(Z, N, D) \ + proto::and_< \ + BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(N) \ + /**/ + #define BOOST_PHOENIX_ACTOR_END_ASSIGN(Z, N, D) \ + > \ + /**/ + #define BOOST_PHOENIX_ACTOR_ASSIGN_CALL(N) \ + proto::when< \ proto::nary_expr \ - , proto::and_< \ - BOOST_PP_ENUM( \ - N \ - , BOOST_PHOENIX_ACTOR_ASSIGN_CHILD \ - , _ \ - ) \ - > \ + , BOOST_PP_ENUM( \ + N \ + , BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD \ + , _ \ + ) \ + BOOST_PP_REPEAT( \ + N \ + , BOOST_PHOENIX_ACTOR_END_ASSIGN \ + , _ \ + ) \ > \ /**/ - + #define BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL(Z, N, D) \ + proto::or_< \ + BOOST_PHOENIX_ACTOR_ASSIGN_CALL(N) \ + /**/ + #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) #include #else @@ -125,17 +139,20 @@ namespace boost { namespace phoenix #endif struct assign - : proto::or_< - BOOST_PP_ENUM_SHIFTED( - BOOST_PHOENIX_LIMIT - , BOOST_PHOENIX_ACTOR_ASSIGN_CALL - , _ - ) + : BOOST_PP_ENUM_SHIFTED( + BOOST_PHOENIX_LIMIT + , BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL + , _ + ) , proto::when< proto::terminal , do_assign(proto::_, proto::_state) > - > + BOOST_PP_REPEAT( + BOOST_PP_DEC(BOOST_PHOENIX_LIMIT) + , BOOST_PHOENIX_ACTOR_END_ASSIGN + , _ + ) {}; #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) @@ -144,7 +161,11 @@ namespace boost { namespace phoenix #endif #undef BOOST_PHOENIX_ACTOR_ASSIGN_CALL + #undef BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL + #undef BOOST_PHOENIX_ACTOR_END_ASSIGN_CALL #undef BOOST_PHOENIX_ACTOR_ASSIGN_CHILD + #undef BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD + #undef BOOST_PHOENIX_ACTOR_END_ASSIGN_CHILD } // Bring in the result_of::actor<>