7 Nov
2018
7 Nov
'18
7:41 a.m.
On 11/6/18 7:12 PM, rmawatson rmawatson via Boost-users wrote:
It's been a long while since I've used spirit::qi. But What it looks like is happeneing in your setup is something liek this,
When you have:
qi::rule
full_id; the attribute is vector<string>
When it matches
id >> *(char_('.') >> id)
this has an attribute of vector
>> or something similar. [snip]
One thing you can do is use qi::asstd::string()[ id >> *(char_('.') >> id) ] to force conversion of synthesised attribute to a string to happen before it is assigned to your attribute. [snip]
rmawatson's asstd::string suggestion works: https://coliru.stacked-crooked.com/a/a2c9435ee9e88bad Yeah rmawatson!