mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-26 20:30:06 +01:00
Allow mixing named and automatic arguments
This commit is contained in:
@@ -3001,12 +3001,10 @@ struct dynamic_formatter {
|
||||
template <typename Char>
|
||||
inline typename basic_context<Char>::format_arg
|
||||
basic_context<Char>::get_arg(basic_string_view<Char> name) {
|
||||
if (this->check_no_auto_index()) {
|
||||
map_.init(this->args());
|
||||
if (const format_arg *arg = map_.find(name))
|
||||
return *arg;
|
||||
this->on_error("argument not found");
|
||||
}
|
||||
map_.init(this->args());
|
||||
if (const format_arg *arg = map_.find(name))
|
||||
return *arg;
|
||||
this->on_error("argument not found");
|
||||
return format_arg();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user