
Please see attached code. Why does line A compile while line B doesn't? Thanks.
Here is the code (to have a reference): template <typename Iterator> struct idlist: qi::grammar<Iterator, std::string(), ascii::space_type> { ecgp::ident<Iterator> id; idlist(): idlist::base_type(start) { using namespace qi; start %= id >> (char_(',') >> id); // line A //start %= id >> *(char_(',') >> id); // line B } qi::rule<Iterator, std::string(), ascii::space_type> start; }; where the attribute of id is std::string. The problem is an attribute mismatch of the attribute exposed by start (which is std::string) and the rhs, which formally exposes tuple<std::string, std::vector<std::string>>, but in addition should be compatible with a plain std::vector<std::string> (although we know there is a bug preventing this to compile). If you are really just interested in the overall string matched by start's rhs, you could write: start %= raw[id >> *(char_(',') >> id)]; HTH Regards Hartmut --------------- Meet me at BoostCon www.boostcon.com