Open x0id opened 10 months ago
boost::get
is implemented by Boost Variant library. It knows about boost::recursive_wrapper
:
template <class VariantElement, class T>
struct variant_element_functor :
boost::mpl::or_<
boost::is_same<VariantElement, T>,
boost::is_same<VariantElement, boost::recursive_wrapper<T> >,
boost::is_same<VariantElement, T& >
>
{};
But it has no clue about boost::spirit::x3::forward_ast
. I don't think Boost Spirit can do something about it.
The following code runs as expected:
But it fails to compile without
x3::forward_ast<>
wrapper in line 44. In contrast, originalboost::variant
does not require to specifyboost::recursive_wrapper<>
in the similarboost::get<>()
call (line 46).Coliru link: https://coliru.stacked-crooked.com/a/f52d436f462056ff