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 {
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 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
tuplestd::string>, but in addition should be
compatible with a plain std::vectorstd::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