Make format work with C++17 std::string_view (#571)

This commit is contained in:
Victor Zverovich
2018-02-07 07:37:05 -08:00
parent 64599973e9
commit 67e070fe5a
3 changed files with 18 additions and 16 deletions

View File

@@ -41,7 +41,7 @@ const unsigned BIG_NUM = INT_MAX + 1u;
// Makes format string argument positional.
std::string make_positional(fmt::string_view format) {
std::string s(format.to_string());
std::string s(format.data(), format.size());
s.replace(s.find('%'), 1, "%1$");
return s;
}