format std::reference_wrapper

This commit is contained in:
Yedidya Feldblum
2024-09-16 13:37:19 -05:00
committed by Victor Zverovich
parent 4197727712
commit 07e70151d5
2 changed files with 16 additions and 0 deletions

View File

@ -395,3 +395,8 @@ TEST(std_test, format_shared_ptr) {
EXPECT_EQ(fmt::format("{}", fmt::ptr(sp.get())),
fmt::format("{}", fmt::ptr(sp)));
}
TEST(std_test, format_reference_wrapper) {
int num = 35;
EXPECT_EQ("35", fmt::to_string(std::cref(num)));
}