Saturday, 7 September 2013

How to make the boost::apply_visitor a friend-function of the class-visitor?

How to make the boost::apply_visitor a friend-function of the class-visitor?

How to make the boost::apply_visitor (either of two variants) a
friend-function of class-visitor?
I have tried the following: friend result_type
boost::apply_visitor<>(decltype(*this) &, instruction_type const &);, but
this does not work. *this derived from boost::static_visitor (or have
using result_type = ...; typedef) and instruction type is the
boost::variant of some specific types. *this have all required operator
()-s in private section.
What is the right form of such declaration?

No comments:

Post a Comment