template<class Tag, class... Visitables>
class Visitor< Tag, Visitables >
Visitor type generator for types included in visitable_types. Produces type-safe instance of Visitor per given Tag and a type-list of Visitables (at least one). User shall derive publicly from this type Visitor<Tag, Vs...> (tag can be the name of the derived type), and inherit Visitor constructor. Visitable types must be derived from VisitableWith<T> where T is the name of the visitor. Do not pass references in Visitables type-list.
Example
struct Example
Example
, A, B, C, D
>
{
};
Visitor(Fs &&... fs)
Definition visitor.h:147
- See also
- CanNodeDataModelVisitor for an example
-
http://insooth.github.io/visitor-pattern.md for an article