Make a visitor for a base type
Synopsis
Declared in <mrdocs/Support/Visitor.hpp>
template<
typename BaseTy,
typename ObjectTy,
typename FnTy,
typename... ArgsTy>
auto
makeVisitor(
ObjectTy&& obj,
FnTy&& fn,
ArgsTy...&&... args);
Description
The returned visitor is an object with a template method visit which can be called with a derived type of the object being visited.
The visitor stores the arguments args passed to this function, and its method visit calls the function fn with the derived type as the first argument, followed by args.
Return Value
The common return type of fn when called with a derived type of obj and args
Parameters
Name |
Description |
obj |
The object to visit |
fn |
The function object to call |
args |
The arguments to pass to the function object |
Created with MrDocs