Problem with qi::_1 and qi::_3

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Problem with qi::_1 and qi::_3

Jens Kallup

I have following snippet, that cause me error at compile time.
The problem may lay in "op2(qi::_1,qi::_2)",
because in this form, the compiler fails.
When I use "op2(qi::_1,0.00)", all Ok.

What can I do?
the rule is:

qi::rule<Iterator, Skipper> symbol_def_expr, variable;
qi::rule<Iterator, double, Skipper> symbol_expr;

     struct compile_op2
         typedef double result_type;
         compile_op2() { }
         template<typename T1, typename T2>
         double operator()(T1 const &t1, T2 const &t2) const
             QString s1 = typeid(T1).name();
             QString s2 = typeid(T2).name();

         return 0.1;

     phoenix::function<compile_op2> op2;

    symbol_def_expr =
    >>   lit("=")
    >>   symbol_expr [
             op2(qi::_1,qi::_3) ]

Thanks for helping


Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Spirit-general mailing list
[hidden email]