
Please see attached code. Why does line A compile while line B doesn't? Thanks.

AMDG philip tucker wrote:
Please see attached code. Why does line A compile while line B doesn't? Thanks.
Isn't the attribute type of *(char_(',') >> id) std::vectorstd::string, rather than std::string()? In Christ, Steven Watanabe

Beg pardon, wrong question. Would you give me an example of a separate string id parser (like ident?) used in a comma-separated-list parser? In short, I don't know how to resolve the discrepancy in attributes. Thanks again. On 17 Mar 2010, at 12:32 PM, Igor R wrote:
Please see attached code. Why does line A compile while line B doesn't?
It looks like the attribute of the line B cannot be converted to std::string, because the attr of *(char_(',') >> id) is vector<string>. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Beg pardon, wrong question.
Would you give me an example of a separate string id parser (like ident?) used in a comma-separated-list parser? In short, I don't know how to resolve the discrepancy in attributes.
Do you mean something like this?
#include

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
participants (4)
-
Hartmut Kaiser
-
Igor R
-
philip tucker
-
Steven Watanabe