[#mp_units-utility-parse_dynamic_spec] = xref:mp_units.adoc[mp_units]::xref:mp_units/utility.adoc[utility]::parse_dynamic_spec :relfileprefix: ../../ :mrdocs: Parses a spec value that may be a literal integer or a `{}`‐style dynamic argument reference. == Synopsis Declared in `<mp‐units/utility/format.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< std::forward_iterator It, typename Char = std::iter_value_t<It>> [[nodiscard]] constexpr It parse_dynamic_spec( It begin, It end, int& value, xref:mp_units/utility/fmt_arg_ref.adoc[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 https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | 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 |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#