16 #include <type_traits>
22 virtual ~IVisitor() =
default;
23 virtual void visit(
IAlgTool* )
const = 0;
39 template <
typename Callable,
typename = std::enable_if_t<std::is_invocable_r_v<
void, Callable, IAlgTool*>>>
41 const std::regex& reject_filter = s_noFilter ) {
42 class Visitor final :
public IVisitor {
46 Visitor( Callable* f ) : m_func{ f } {}
47 void visit(
IAlgTool* alg_tool )
const override { std::invoke( *m_func, alg_tool ); }
49 recursiveVisit( tools, Visitor{ &callable }, reject_filter );