Boost Spirit: Error C2664, Cannot convert 'const boost::phoenix::actor<Eval>' to 'char' Boost Spirit: Error C2664, Cannot convert 'const boost::phoenix::actor<Eval>' to 'char' json json

Boost Spirit: Error C2664, Cannot convert 'const boost::phoenix::actor<Eval>' to 'char'


More update:

Kostya has a good point and 'half' touches base: boost::bind actually is fine, just use different placeholders :

[ boost::bind(&print_char, ::_1) ][ phoenix::bind(&print_char, qi::_1) ][ print_char ]

All three should work, but not mixed :)


Seems that boost::bind is not very good to use with spirit. I remember that it was recommended to use phoenix instead. I've replaced the line in consideration with:

   char_('{') [std::cout << boost::phoenix::arg_names::arg1]

It compiles. Have no time to check if it actually works.