Always use fallback string_view to pass format string (#664)
This commit is contained in:
1 parent
34cf54c2fc
commit
4d35f94133
2 files changed
+31
-7
No files matched your search
@@ -1213,6 +1213,12 @@ TEST(FormatterTest, FormatStringView) {
|
||||
EXPECT_EQ("test", format("{0}", string_view("test")));
|
||||
}
|
||||
|
||||
#ifdef FMT_USE_STD_STRING_VIEW
|
||||
TEST(FormatterTest, FormatStringView) {
|
||||
EXPECT_EQ("test", format("{0}", std::string_view("test")));
|
||||
}
|
||||
#endif
|
||||
|
||||
struct ConvertibleToString {
|
||||
std::string s;
|
||||
ConvertibleToString() : s("foo") {}
|
||||
|
||||
Reference in new issue
Block a user