mp_units::utility::handle_dynamic_spec

Resolves a dynamic ({}-style) spec against the format arguments.

Synopsis

Declared in <mp-units/utility/format.h>

template<
    class Handler,
    typename Context>
constexpr
void
handle_dynamic_spec(
    int& value,
    fmt_arg_ref<Context::char_type> ref,
    Context& ctx);

Description

If ref does not reference an argument (kind == fmt_arg_id_kind::none), value is left unchanged.

Parameters

NameDescription
valuethe spec value to update when ref references an argument
refthe reference to the format argument holding the dynamic value, if any
ctxthe format context providing access to the format arguments