Fix std::byte formatting with compile-time API (#2072)
* add test for byte formatting with `FMT_COMPILE` * fix byte formatting with `FMT_COMPILE`, use `__cpp_lib_byte` macro * use is not custom mapped type check * workaround MSVC bug
This commit is contained in:
@@ -130,6 +130,9 @@ TEST(CompileTest, FormatDefault) {
|
||||
EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), "foo"));
|
||||
EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), std::string("foo")));
|
||||
EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), test_formattable()));
|
||||
# ifdef __cpp_lib_byte
|
||||
EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), std::byte{42}));
|
||||
# endif
|
||||
}
|
||||
|
||||
TEST(CompileTest, FormatWideString) {
|
||||
|
||||
Reference in New Issue
Block a user