Style: remove dead code, apply snake_case, and fix newline

This commit is contained in:
AMAN UPADHYAY 2026-07-06 00:10:41 +05:30 committed by Victor Zverovich
parent b1ea40fe8c
commit 57011673d2
2 changed files with 5 additions and 22 deletions

View File

@ -168,14 +168,6 @@ constexpr auto get_arg_checked(const Args&... args) -> const T& {
template <typename Char>
struct is_compiled_format<code_unit<Char>> : std::true_type {};
template <typename T, typename = void>
struct compile_has_format_as : std::false_type {};
template <typename T>
struct compile_has_format_as<T, void_t<decltype(format_as(std::declval<const T&>()))>> : std::true_type {};
template <typename Char, typename V, int N> struct field {
using char_type = Char;
@ -195,11 +187,6 @@ template <typename Char, typename V, int N> struct field {
}
};
template <typename Char, typename T, int N>
struct is_compiled_format<field<Char, T, N>> : std::true_type {};

View File

@ -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}));
}