Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2008-04-20 09:25:47


Author: hkaiser
Date: 2008-04-20 09:25:47 EDT (Sun, 20 Apr 2008)
New Revision: 44625
URL: http://svn.boost.org/trac/boost/changeset/44625

Log:
Spirit.Lex: Reverted wrap_action code to use Boost.Bind for now, just to avoid regression errors.
Text files modified:
   trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp | 52 ++++++++++++++++++++--------------------
   1 files changed, 26 insertions(+), 26 deletions(-)

Modified: trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp 2008-04-20 09:25:47 EDT (Sun, 20 Apr 2008)
@@ -30,34 +30,34 @@
         }
 
         // wrap phoenix actor, make sure first argument is a fusion sequence
-// template <typename Eval>
-// static void phoenix_action(phoenix::actor<Eval> const& f,
-// Attribute const& attr, std::size_t id, bool& pass, Context& ctx)
-// {
-// f(spirit::detail::pass_value<Attribute const>::call(attr), id, pass, ctx);
-// }
-
- struct phoenix_action
+ template <typename Eval>
+ static void phoenix_action(phoenix::actor<Eval> const& f,
+ Attribute const& attr, std::size_t id, bool& pass, Context& ctx)
         {
- template <typename F, typename T1, typename T2, typename T3, typename T4>
- struct result { typedef void type; };
-
- template <typename Eval>
- void
- operator()(phoenix::actor<Eval> const& f, Attribute const& attr,
- std::size_t id, bool& pass, Context& ctx) const
- {
- f(spirit::detail::pass_value<Attribute const>::call(attr), id, pass, ctx);
- }
- };
+ f(spirit::detail::pass_value<Attribute const>::call(attr), id, pass, ctx);
+ }
+
+// struct phoenix_action
+// {
+// template <typename F, typename T1, typename T2, typename T3, typename T4>
+// struct result { typedef void type; };
+//
+// template <typename Eval>
+// void
+// operator()(phoenix::actor<Eval> const& f, Attribute const& attr,
+// std::size_t id, bool& pass, Context& ctx) const
+// {
+// f(spirit::detail::pass_value<Attribute const>::call(attr), id, pass, ctx);
+// }
+// };
 
         template <typename Eval>
         static FunctionType call(phoenix::actor<Eval> const& f)
         {
- using phoenix::arg_names::arg1;
- using phoenix::arg_names::arg2;
- using phoenix::arg_names::arg3;
- using phoenix::arg_names::arg4;
+// using phoenix::arg_names::arg1;
+// using phoenix::arg_names::arg2;
+// using phoenix::arg_names::arg3;
+// using phoenix::arg_names::arg4;
 
 // void (*pf)(phoenix::actor<Eval> const&,
 // Attribute const&, std::size_t, bool&, Context&) =
@@ -65,10 +65,10 @@
 //
 // return phoenix::bind(pf, f, arg1, arg2, arg3, arg4);
 
- return phoenix::bind(phoenix_action(), f, arg1, arg2, arg3, arg4);
+// return phoenix::bind(phoenix_action(), f, arg1, arg2, arg3, arg4);
             
- //~ return boost::bind(
- //~ &wrap_action::phoenix_action<Eval>, f, _1, _2, _3, _4);
+ return boost::bind(
+ &wrap_action::phoenix_action<Eval>, f, _1, _2, _3, _4);
         }
 
         // semantic actions with 3 arguments


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