mrdocs::dom::Object::visit

Invoke the visitor for each key/value pair

Synopses

Declared in <mrdocs/Dom/Object.hpp>

Invoke the visitor for each key/value pair

template<class F>
requires std::invocable<F, String, Value> &&
        std::same_as<std::invoke_result_t<F, String, Value>, bool>
bool
visit(F&& fn) const;

Invoke the visitor for each key/value pair

template<class F>
requires std::invocable<F, String, Value> &&
        mrdocs::detail::isExpected<std::invoke_result_t<F, String, Value>>
Expected<void, std::invoke_result_t<F, String, Value>::error_type>
visit(F&& fn) const;

Invoke the visitor for each key/value pair

template<class F>
requires std::invocable<F, String, Value> &&
        std::same_as<std::invoke_result_t<F, String, Value>, void>
void
visit(F&& fn) const;

Return Value

  • true if the visitor returned true for all elements, otherwise false.

  • void if the visitor returned did not return an error for any element, otherwise E.

Parameters

Name Description

fn

The visitor function.

Created with MrDocs