
14 Apr
2016
14 Apr
'16
11:06 a.m.
Andrzej Krzemienski wrote:
The problem I am solving is to how to access the whole variant object from inside a static visitor:
``` using VariantOb = boost::variant<Ob>;
struct MyVisitor : boost::static_visitor<> { void operator()(Ob const& ob) const
Can't you have struct MyVisitor { typedef void result_type; void operator()(Ob const& ob, Var const& var) const; }; and then pass bind( MyVisitor(), _1, ref(v) ) to visit?