Is there a document somewhere which describes how various spirit::x3 rule definition operations affect attribute compatibility?
I was surprised when:
x3::lexeme[ x3::alpha > *(x3::alnum | x3::char_('_')) ]
could not be moved into a fusion-adapted struct:
struct Name {
std::string value;
};
For the time being, I got rid of the first mandatory alphabetical character, but I would still like to express a rule which defines that the name string must begin with a letter. Is this one of those situations where I need to try adding eps
around until it works, or is there a stated reason why the above couldn't work?
I apologize if this has been written down somewhere, I couldn't find it.
See Question&Answers more detail:os