Add xchar support for std::byte formatter (#4480)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
Vladislav Shchapov
2025-06-24 02:02:11 +05:00
committed by GitHub
parent f4345467fc
commit 571c02d475
2 changed files with 10 additions and 2 deletions

View File

@ -171,6 +171,13 @@ TEST(xchar_test, join) {
EXPECT_EQ(fmt::format(L"({})", fmt::join(t, L", ")), L"(a, 1, 2)");
}
#ifdef __cpp_lib_byte
TEST(xchar_test, join_bytes) {
auto v = std::vector<std::byte>{std::byte(1), std::byte(2), std::byte(3)};
EXPECT_EQ(fmt::format(L"{}", fmt::join(v, L", ")), L"1, 2, 3");
}
#endif
enum streamable_enum {};
std::wostream& operator<<(std::wostream& os, streamable_enum) {