From e75368a58b8c97c2c95906327ac8c38aad418e65 Mon Sep 17 00:00:00 2001 From: AMAN UPADHYAY Date: Mon, 6 Jul 2026 00:10:41 +0530 Subject: [PATCH] Style: remove dead code, apply snake_case, and fix newline --- include/fmt/compile.h | 13 ------------- test/compile-test.cc | 14 +++++--------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 2c5a4323..838dd0c4 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -168,14 +168,6 @@ constexpr auto get_arg_checked(const Args&... args) -> const T& { template struct is_compiled_format> : std::true_type {}; - -template -struct compile_has_format_as : std::false_type {}; - -template -struct compile_has_format_as()))>> : std::true_type {}; - - template struct field { using char_type = Char; @@ -195,11 +187,6 @@ template struct field { } }; - - - - - template struct is_compiled_format> : std::true_type {}; diff --git a/test/compile-test.cc b/test/compile-test.cc index 94a7da1b..73e86f35 100644 --- a/test/compile-test.cc +++ b/test/compile-test.cc @@ -480,16 +480,12 @@ TEST(compile_test, constexpr_string_format) { } #endif // FMT_USE_CONSTEXPR_STRING - - - namespace { -struct CompileFormatAsType { +struct compile_format_as_type { int value; }; -int format_as(CompileFormatAsType f) { return f.value; } -} // namespace - -TEST(CompileTest, FormatAs) { - EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), CompileFormatAsType{42})); +int format_as(compile_format_as_type f) { return f.value; } +} +TEST(compile_test, format_as) { + EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), compile_format_as_type{42})); } \ No newline at end of file