Template Class precise_visitor
Defined in File visitor.hpp
Inheritance Relationships
Base Types
public VisitorImpl
protected boost::static_visitor< void >
Class Documentation
-
template<typename VisitorImpl, typename TypeList>
class precise_visitor : public VisitorImpl, protected boost::static_visitor<void> Visitor that will only visit precisely with types that exactly match one of the types in its type list (i.e. no implicit upcasting is allowed). SFINAE FTW!
For each visitee type you want to be able to visit, you must (1) include it in the type list for the list, (2) define a function with the following exact signature:
void visit(<vistee_type>&)
If these conditions are not meant, then trying to call visit() will result in a compiler error.
Note
Non-static methods from
VisitorImpl
will be available in the derived class (in contrast to precise_visitor).- Template Parameters:
VisitorImpl – The name of the class containing the actual implementation of the visit functions.
TypeList – List of types that the class will be able to visit. Must be a rmpl::typelist.