mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-04 03:40:49 +02:00
Always use fallback string_view to pass format string (#664)
This commit is contained in:
@@ -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