From 6369af37d3a2ca808a2501c031858ed4b6fa5ea4 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 27 May 2023 09:02:26 -0700 Subject: [PATCH] Simplify formatters --- include/fmt/format.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 536af047..6dca13fa 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4088,22 +4088,10 @@ struct formatter::value>> } }; -template -struct formatter : formatter { - template - auto format(void* val, FormatContext& ctx) const -> decltype(ctx.out()) { - return formatter::format(val, ctx); - } -}; +FMT_FORMAT_AS(void*, const void*); template -struct formatter : formatter, Char> { - template - FMT_CONSTEXPR auto format(const Char* val, FormatContext& ctx) const - -> decltype(ctx.out()) { - return formatter, Char>::format(val, ctx); - } -}; +struct formatter : formatter, Char> {}; /** \rst