Problem with qi::_1 and qi::_3

Jens Kallup <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
Hello

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();

             MsgBox("typsers",QString("--->%1<-->%2")
             .arg(s1)
             .arg(s2));
         }
         return 0.1;
     };

     phoenix::function<compile_op2> op2;

 1.
    symbol_def_expr =
 2.
    (
 3.
    (
 4.
         variable
 5.
    >>   lit("=")
 6.
    >>   symbol_expr [
 7.
             op2(qi::_1,qi::_3) ]
 8.
    )
 9.
    )
10.
    ;

Thanks for helping

Jens


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.