From 497df6db6184af38fa237d95947f19b3abee2794 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 16 Sep 2024 20:32:27 -0700 Subject: [PATCH] Remove formattable --- include/fmt/base.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 0456e334..27443789 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1116,9 +1116,6 @@ template constexpr auto has_formatter() -> bool { return decltype(has_formatter_impl(static_cast(nullptr)))::value; } -template -struct formattable : bool_constant()> {}; - // Maps formatting argument types to natively supported types or user-defined // types with formatters. Returns void on errors to be SFINAE-friendly. template struct type_mapper { @@ -1173,7 +1170,7 @@ template struct type_mapper { static auto map(const T& x) -> decltype(map(format_as(x))); template ::value)> - static auto map(T&) -> conditional_t::value, T&, void>; + static auto map(T&) -> conditional_t(), T&, void>; template ::value)> static auto map(const T& named_arg) -> decltype(map(named_arg.value)); @@ -2182,7 +2179,7 @@ template class value { : named_args{args, size} {} private: - template ::value)> + template ())> FMT_CONSTEXPR value(T& x, custom_tag) { using value_type = remove_cvref_t; // T may overload operator& e.g. std::vector::reference in libc++. @@ -2199,7 +2196,7 @@ template class value { custom.format = format_custom>; } - template ::value)> + template ())> FMT_CONSTEXPR value(const T&, custom_tag) { // Cannot format an argument; to make type T formattable provide a // formatter specialization: https://fmt.dev/latest/api.html#udt.