Ambiguous variant and boost spirit x3
问题 Trying to tweak the boost spirit x3 calc example to parse functions that can take functions as arguments. However it does not compile. namespace client{ namespace ast{ struct ts; struct fnc; typedef boost::variant< ts, boost::recursive_wrapper<fnc> > node; struct ts{ unsigned int id; }; struct fnc{ std::vector<char> id; std::vector<node> args; }; }} BOOST_FUSION_ADAPT_STRUCT( client::ast::ts, (unsigned int, id) ) BOOST_FUSION_ADAPT_STRUCT( client::ast::fnc, (std::vector<char>, id) (std: