mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-02 23:21:45 +01:00
Move has_formatter into the public fmt namespace. (#1407)
* Move has_formatter into the public fmt namespace. This will allow users to do SFINAE-friendly checks for the formattability of a type. Fixes #1369
This commit is contained in:
committed by
Victor Zverovich
parent
52ae134f84
commit
2145a7bdcc
@@ -1974,8 +1974,8 @@ enum TestEnum { A };
|
||||
TEST(FormatTest, Enum) { EXPECT_EQ("0", fmt::format("{}", A)); }
|
||||
|
||||
TEST(FormatTest, FormatterNotSpecialized) {
|
||||
EXPECT_FALSE((fmt::internal::has_formatter<fmt::formatter<TestEnum>,
|
||||
fmt::format_context>::value));
|
||||
static_assert(!fmt::has_formatter<fmt::formatter<TestEnum>,
|
||||
fmt::format_context>::value, "");
|
||||
}
|
||||
|
||||
#if FMT_HAS_FEATURE(cxx_strong_enums)
|
||||
|
||||
Reference in New Issue
Block a user