Parses a spec value that may be a literal integer or a {}‐style dynamic argument reference.

Synopsis

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

template<
    std::forward_iterator It,
    typename Char = std::iter_value_t<It>>
[[nodiscard]]
constexpr
It
parse_dynamic_spec(
    It begin,
    It end,
    int& value,
    fmt_arg_ref<Char>& ref,
    std::basic_format_parse_context<Char>& ctx);

Return Value

an iterator past the parsed spec value, or begin when neither form is present

Note

The return value should not be discarded.

Parameters

Name

Description

begin

the beginning of the range to parse; must be non‐empty

end

the end of the range to parse

value

updated with the parsed value when it is a literal integer

ref

updated with the referenced argument when the value is {}‐style dynamic

ctx

the format parse context, used to validate a dynamic argument reference

Created with MrDocs