diff --git a/test/compile-test.cc b/test/compile-test.cc index c93d898d..ead5c9ec 100644 --- a/test/compile-test.cc +++ b/test/compile-test.cc @@ -497,7 +497,7 @@ TEST(compile_test, format_as) { struct constexpr_enabled {}; -template <> struct fmt::formatter { +template <> struct fmt::formatter : formatter { bool debug = false; FMT_CONSTEXPR auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) { if (ctx.begin() != ctx.end() && *ctx.begin() == '?') { @@ -509,8 +509,7 @@ template <> struct fmt::formatter { template FMT_CONSTEXPR auto format(constexpr_enabled, FormatContext& ctx) const -> decltype(ctx.out()) { - return fmt::formatter{}.format( - debug ? "debug" : "regular", ctx); + return formatter::format(debug ? "debug" : "regular", ctx); } };