Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-05-29 18:18:28


Author: eric_niebler
Date: 2008-05-29 18:18:27 EDT (Thu, 29 May 2008)
New Revision: 45927
URL: http://svn.boost.org/trac/boost/changeset/45927

Log:
better error messages for invalid lambda expressions
Text files modified:
   branches/proto/v4/boost/phoenix/core/actor.hpp | 20 +++++++++++++-------
   1 files changed, 13 insertions(+), 7 deletions(-)

Modified: branches/proto/v4/boost/phoenix/core/actor.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/core/actor.hpp (original)
+++ branches/proto/v4/boost/phoenix/core/actor.hpp 2008-05-29 18:18:27 EDT (Thu, 29 May 2008)
@@ -223,6 +223,8 @@
             {};
 
             typedef mpl::void_ const &initial_state_type;
+
+ typedef proto::detail::any any;
 
             ////////////////////////////////////////////////////////////////////////////////////////
             template<typename Sig>
@@ -240,13 +242,17 @@
             #define M0(Z, N, DATA) \
             template<typename This BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, typename A)> \
             struct result<This(BOOST_PP_ENUM_PARAMS_Z(Z, N, A))> \
- : result_of< \
- evaluator<>( \
- This & \
- , initial_state_type \
- , BOOST_PP_CAT(fusion::vector, N)<BOOST_PP_ENUM_PARAMS_Z(Z, N, A)> & \
- ) \
- > \
+ : mpl::if_c< \
+ proto::matches<This, evaluator<> >::type::value \
+ , result_of< \
+ evaluator<>( \
+ This & \
+ , initial_state_type \
+ , BOOST_PP_CAT(fusion::vector, N)<BOOST_PP_ENUM_PARAMS_Z(Z, N, A)> & \
+ ) \
+ > \
+ , mpl::identity<any> \
+ >::type \
             {}; \
             /**/
             BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(PHOENIX_LIMIT), M0, ~)


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