Always use fallback string_view to pass format string (#664)

This commit is contained in:
Victor Zverovich committed 2018-02-24 18:19:30 +00:00
1 parent 34cf54c2fc
commit 4d35f94133
2 files changed
+31 -7

No files matched your search

+6
View File
@@ -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") {}