Issue #2816: also strip named-arg for the fallback formatter
This commit is contained in:
parent
4ad90578f7
commit
ac0d9d5fe2
@ -2665,13 +2665,14 @@ FMT_CONSTEXPR auto parse_format_specs(ParseContext& ctx)
|
|||||||
-> decltype(ctx.begin()) {
|
-> decltype(ctx.begin()) {
|
||||||
using char_type = typename ParseContext::char_type;
|
using char_type = typename ParseContext::char_type;
|
||||||
using context = buffer_context<char_type>;
|
using context = buffer_context<char_type>;
|
||||||
|
using stripped_type = typename strip_named_arg<T>::type;
|
||||||
using mapped_type = conditional_t<
|
using mapped_type = conditional_t<
|
||||||
mapped_type_constant<T, context>::value != type::custom_type,
|
mapped_type_constant<T, context>::value != type::custom_type,
|
||||||
decltype(arg_mapper<context>().map(std::declval<const T&>())),
|
decltype(arg_mapper<context>().map(std::declval<const T&>())),
|
||||||
typename strip_named_arg<T>::type>;
|
stripped_type>;
|
||||||
auto f = conditional_t<has_formatter<mapped_type, context>::value,
|
auto f = conditional_t<has_formatter<mapped_type, context>::value,
|
||||||
formatter<mapped_type, char_type>,
|
formatter<mapped_type, char_type>,
|
||||||
fallback_formatter<T, char_type>>();
|
fallback_formatter<stripped_type, char_type>>();
|
||||||
return f.parse(ctx);
|
return f.parse(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user