Move std::byte formatter to std.h

This commit is contained in:
Victor Zverovich
2026-02-03 06:52:46 -08:00
parent b98926b73b
commit eb99f6eba6
7 changed files with 27 additions and 35 deletions
+8
View File
@@ -460,6 +460,14 @@ TEST(std_test, format_bitset) {
EXPECT_EQ(fmt::format("{:-^12}", bs), "---101010---");
}
#ifdef __cpp_lib_byte
TEST(base_test, format_byte) {
auto s = std::string();
fmt::format_to(std::back_inserter(s), "{}", std::byte(42));
EXPECT_EQ(s, "42");
}
#endif
TEST(std_test, format_atomic) {
std::atomic<bool> b(false);
EXPECT_EQ(fmt::format("{}", b), "false");