mrdocs::visit

Visit a Type with the provided callable.

Synopsis

Declared in <mrdocs/Metadata/Type.hpp>

template<
    std::derived_from<Symbol> TypeTy,
    class F,
    class... Args>
constexpr
decltype(auto)
visit(
    TypeTy& info,
    F&& fn,
    Args&&... args);

Description

Visit a template argument, dispatching on its concrete kind.

Invoke a function object with a type derived from Symbol

This function will invoke the function object fn with a type derived from Symbol as the first argument, followed by args.... The type of the first argument is determined by the SymbolKind of the Symbol object.

Return Value

  • Whatever the callable returns.

  • The result of calling the function object with the derived type

Parameters

Name

Description

info

The type instance to visit.

fn

The callable to dispatch to the concrete type.

args

Additional arguments forwarded to the callable.

Created with MrDocs