Cleanup base API

This commit is contained in:
Victor Zverovich
2024-09-01 19:35:00 -07:00
parent 9ef160d309
commit 60740b7c24
5 changed files with 23 additions and 32 deletions
-9
View File
@@ -604,15 +604,6 @@ template <> struct formatter<enabled_ptr_formatter*> {
};
FMT_END_NAMESPACE
TEST(base_test, has_formatter) {
using fmt::has_formatter;
using context = fmt::format_context;
static_assert(has_formatter<enabled_formatter, context>::value, "");
static_assert(!has_formatter<disabled_formatter, context>::value, "");
static_assert(!has_formatter<disabled_formatter_convertible, context>::value,
"");
}
struct const_formattable {};
struct nonconst_formattable {};
+2 -2
View File
@@ -2022,8 +2022,8 @@ TEST(format_test, named_arg_udl) {
TEST(format_test, enum) { EXPECT_EQ(fmt::format("{}", foo), "0"); }
TEST(format_test, formatter_not_specialized) {
static_assert(!fmt::has_formatter<fmt::formatter<test_enum>,
fmt::format_context>::value,
static_assert(!fmt::is_formattable<fmt::formatter<test_enum>,
fmt::format_context>::value,
"");
}
+1 -2
View File
@@ -363,8 +363,7 @@ TEST(ranges_test, enum_range) {
#if !FMT_MSC_VERSION
TEST(ranges_test, unformattable_range) {
EXPECT_FALSE((fmt::has_formatter<std::vector<unformattable>,
fmt::format_context>::value));
EXPECT_FALSE((fmt::is_formattable<std::vector<unformattable>, char>::value));
}
#endif