Deprecated implicit conversion of enums to ints for consistency with scoped enums

This commit is contained in:
Victor Zverovich
2022-07-03 09:02:22 -07:00
parent c12b4c0cf1
commit 0c06c81da8
7 changed files with 23 additions and 19 deletions
+1
View File
@@ -222,6 +222,7 @@ struct formatter<streamable_enum, wchar_t> : basic_ostream_formatter<wchar_t> {
} // namespace fmt
enum unstreamable_enum {};
auto format_as(unstreamable_enum e) -> int { return e; }
TEST(xchar_test, enum) {
EXPECT_EQ(L"streamable_enum", fmt::format(L"{}", streamable_enum()));