mirror of
https://github.com/fmtlib/fmt.git
synced 2026-08-03 20:14:20 +02:00
Add member format_as for std
This commit is contained in:
@@ -2030,6 +2030,8 @@ enum big_enum : unsigned long long { big_enum_value = 5000000000ULL };
|
||||
auto format_as(big_enum e) -> unsigned long long { return e; }
|
||||
|
||||
TEST(format_test, strong_enum) {
|
||||
auto arg = fmt::basic_format_arg<fmt::context>(big_enum_value);
|
||||
EXPECT_EQ(arg.type(), fmt::detail::type::ulong_long_type);
|
||||
EXPECT_EQ(fmt::format("{}", big_enum_value), "5000000000");
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user