I am interested in if there is a way to parse into a set using boost spirit x3. the background is I have a string of tokens, each token represents a enum value, now i want to create a parser which parses if every every token is at most once in the string, it would be a charm if I could get all the parsed tokens into a std::set
while parsing.
To get the enums back from the parsed string I am using a symbol_table:
enum class foo{bar, baz, bla, huh};
struct enum_table : x3::symbols<foo> {
enum_table() {
add("bar", foo::bar)
("baz", foo::baz)
("huh", foo::huh);
}
} const enum_parser;