mirror of
https://github.com/fmtlib/fmt.git
synced 2025-09-27 07:01:02 +02:00
Remove deprecated template parameter
This commit is contained in:
@@ -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>;
|
||||||
|
Reference in New Issue
Block a user