Use p2197 format for complex by default

This commit is contained in:
Victor Zverovich
2024-03-19 07:55:45 +09:00
parent bb882c03bc
commit c0dac83982
3 changed files with 7 additions and 7 deletions

View File

@ -66,9 +66,9 @@ TEST(std_test, thread_id) {
}
TEST(std_test, complex) {
EXPECT_EQ(fmt::format("{}", std::complex<double>(1, 2.2)), "(1,2.2)");
EXPECT_EQ(fmt::format("{}", std::complex<double>(1, 2.2)), "(1+2.2i)");
EXPECT_EQ(fmt::format("{:>20.2f}", std::complex<double>(1, 2.2)),
" (1.00,2.20)");
" (1.00+2.20i)");
}
#ifdef __cpp_lib_source_location