id summary reporter owner description type status milestone component version severity resolution keywords cc 12082 x3::forward_ast ambiguous call mikhail.strelnikov@… Joel de Guzman "Following code works for boost::variant but fails for boost::spirit::x3::variant with '''error: call of '(const c) (boost::spirit::x3::forward_ast&)' is ambiguous''' {{{ #define USE_SPIRIT_X3_VARIANT 1 #include #include #include struct s1; #if USE_SPIRIT_X3_VARIANT == 1 using s2 = boost::spirit::x3::variant >; #else using s2 = boost::variant >; #endif BOOST_FUSION_DEFINE_STRUCT_INLINE ( s1, (s2, v1) ) BOOST_FUSION_DEFINE_STRUCT_INLINE ( magic, (int*, v1) ) struct c { int operator()(long) const { return 0; } int operator()(s1) const { return 1; } int operator()(magic) const { return 3; } }; int main() { s2 s; s = s1{}; return boost::apply_visitor(c(), s); } }}} [http://melpon.org/wandbox/permlink/BPdeuyNPLINriCr3] As you can see, `magic` class does not belong to the variant, but still causes compilation error. " Bugs closed To Be Determined spirit Boost 1.60.0 Problem wontfix