In one of my rules a have qi::locals<> with stl container as parameter. When I compile my program without BOOST_SPIRIT_QI_DEBUG, everything works fine. But when I turn BOOST_SPIRIT_QI_DEBUG on, program can't be compiled because of missing operator <<.
Simplified snippet:
typedef std::list< int > TlstValues;
template <typename Iterator, typename Skipper>
struct G_test : qi::grammar<Iterator, Skipper>
{
...
G_test() : G_test::base_type(rule_test)
{
...
BOOST_SPIRIT_DEBUG_NODE(rule_test);
}
qi::rule<Iterator, qi::locals<TlstValues>, Skipper> rule_test;
}
error:
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'TlstExpressionItems' (or there is no acceptable conversion)
I tried to define streaming operator for TlstValues but without effect. Error was still the same. My operator definition:
std::ostream& operator << (std::ostream& os, TlstValues & z)
{
return os;
}
Can someone please advise me how to define required operator to make BOOST_SPIRIT_DEBUG work?
Thanks and regards Rick