Adapt class containing a string member as synthesized attribute
问题 I’m trying to parse a character string into an attribute of a custom type symbol , which contains a std::string member. I thought I could use BOOST_FUSION_ADAPT_STRUCT here but that doesn’t work. If I declare the rule as rule<It, std::string(), space_type> it works. If I define it as rule<It, symbol(), space_type> it fails with the error “no type name value_type in symbol ”. I think Spirit is trying to append the value character-for-character to the attribute, which fails as expected. But isn