Remove deprecated template parameter

This commit is contained in:
Victor Zverovich
2025-08-24 09:52:17 -07:00
parent b5c4d25cd1
commit 8e4676e4a5

View File

@@ -2257,7 +2257,7 @@ template <typename Context> class value {
custom.value = const_cast<value_type*>(&x); custom.value = const_cast<value_type*>(&x);
#endif #endif
} }
custom.format = format_custom<value_type, formatter<value_type, char_type>>; custom.format = format_custom<value_type>;
} }
template <typename T, FMT_ENABLE_IF(!has_formatter<T, char_type>())> template <typename T, FMT_ENABLE_IF(!has_formatter<T, char_type>())>
@@ -2268,11 +2268,10 @@ template <typename Context> class value {
} }
// Formats an argument of a custom type, such as a user-defined class. // Formats an argument of a custom type, such as a user-defined class.
// DEPRECATED! Formatter template parameter will be removed. template <typename T>
template <typename T, typename Formatter>
static void format_custom(void* arg, parse_context<char_type>& parse_ctx, static void format_custom(void* arg, parse_context<char_type>& parse_ctx,
Context& ctx) { Context& ctx) {
auto f = Formatter(); auto f = formatter<T, char_type>();
parse_ctx.advance_to(f.parse(parse_ctx)); parse_ctx.advance_to(f.parse(parse_ctx));
using qualified_type = using qualified_type =
conditional_t<has_formatter<const T, char_type>(), const T, T>; conditional_t<has_formatter<const T, char_type>(), const T, T>;