Changeset 44623


Ignore:
Timestamp:
Apr 20, 2008, 1:13:42 PM (10 years ago)
Author:
Hartmut Kaiser
Message:

Spirit.Lex: Changed wrap_action::phoenix_action to be a embedded function object. Same errors still...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp

    r44610 r44623  
    3131
    3232        // wrap phoenix actor, make sure first argument is a fusion sequence
    33         template <typename Eval>
    34         static void phoenix_action(phoenix::actor<Eval> const& f,
    35             Attribute const& attr, std::size_t id, bool& pass, Context& ctx)
     33//         template <typename Eval>
     34//         static void phoenix_action(phoenix::actor<Eval> const& f,
     35//             Attribute const& attr, std::size_t id, bool& pass, Context& ctx)
     36//         {
     37//             f(spirit::detail::pass_value<Attribute const>::call(attr), id, pass, ctx);
     38//         }
     39       
     40        struct phoenix_action
    3641        {
    37             f(spirit::detail::pass_value<Attribute const>::call(attr), id, pass, ctx);
    38         }
     42            template <typename F, typename T1, typename T2, typename T3, typename T4>
     43            struct result { typedef void type; };
     44           
     45            template <typename Eval>
     46            void
     47            operator()(phoenix::actor<Eval> const& f, Attribute const& attr,
     48                std::size_t id, bool& pass, Context& ctx) const
     49            {
     50                f(spirit::detail::pass_value<Attribute const>::call(attr), id, pass, ctx);
     51            }
     52        };
    3953
    4054        template <typename Eval>
    4155        static FunctionType call(phoenix::actor<Eval> const& f)
    4256        {
    43              using phoenix::arg_names::arg1;
    44              using phoenix::arg_names::arg2;
    45              using phoenix::arg_names::arg3;
    46              using phoenix::arg_names::arg4;
     57            using phoenix::arg_names::arg1;
     58            using phoenix::arg_names::arg2;
     59            using phoenix::arg_names::arg3;
     60            using phoenix::arg_names::arg4;
    4761
    48             void (*pf)(phoenix::actor<Eval> const&,
    49                 Attribute const&, std::size_t, bool&, Context&) =
    50                     &wrap_action::phoenix_action;
     62//             void (*pf)(phoenix::actor<Eval> const&,
     63//                 Attribute const&, std::size_t, bool&, Context&) =
     64//                     &wrap_action::phoenix_action;
     65//
     66//             return phoenix::bind(pf, f, arg1, arg2, arg3, arg4);
    5167
    52              return phoenix::bind(pf, f, arg1, arg2, arg3, arg4);
    53 
     68            return phoenix::bind(phoenix_action(), f, arg1, arg2, arg3, arg4);
     69           
    5470            //~ return boost::bind(
    5571                //~ &wrap_action::phoenix_action<Eval>, f, _1, _2, _3, _4);
Note: See TracChangeset for help on using the changeset viewer.