Rewrite vfs::get and vfs::mount

Preprocess . and .. correctly
Don't use recursive locking
Also use std::string_view
Fix format system for std::string and std::string_view
Fix fmt::merge for std::string_view
This commit is contained in:
Nekotekina 2018-09-11 19:02:19 +03:00
parent 16dcbe8c74
commit e8b5555630
9 changed files with 346 additions and 151 deletions

View file

@ -5,6 +5,7 @@
#include <string>
#include <vector>
#include <functional>
#include <string_view>
// Copy null-terminated string from std::string to char array with truncation
template <std::size_t N>
@ -100,10 +101,10 @@ namespace fmt
auto end = source.end();
for (--end; it != end; ++it)
{
result += *it + separator;
result += std::string{*it} + separator;
}
return result + source.back();
return result + std::string{source.back()};
}
template <typename T>