mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Improve std::complex formatter to be compatible with P2197R0 (#3900)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
committed by
GitHub
parent
53347891cf
commit
45b772f85c
@ -67,6 +67,7 @@ TEST(std_test, thread_id) {
|
||||
|
||||
TEST(std_test, complex) {
|
||||
EXPECT_EQ(fmt::format("{}", std::complex<double>(1, 2.2)), "(1+2.2i)");
|
||||
EXPECT_EQ(fmt::format("{}", std::complex<double>(0, 2.2)), "2.2i");
|
||||
EXPECT_EQ(fmt::format("{:>20.2f}", std::complex<double>(1, 2.2)),
|
||||
" (1.00+2.20i)");
|
||||
}
|
||||
|
Reference in New Issue
Block a user