summaryrefslogtreecommitdiff
path: root/src/experimental/filesystem/path.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:34 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:34 +0000
commitd23de13b3208b94a25e1de463ea3155911512e61 (patch)
treec2bc9a0cec68a68070eda79306ab632043b91fea /src/experimental/filesystem/path.cpp
parent8462a49537476f8c62bcabfe490226af0d7c1cae (diff)
Notes
Diffstat (limited to 'src/experimental/filesystem/path.cpp')
-rw-r--r--src/experimental/filesystem/path.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/experimental/filesystem/path.cpp b/src/experimental/filesystem/path.cpp
index f49d4cd2d418..dd4026cfe13a 100644
--- a/src/experimental/filesystem/path.cpp
+++ b/src/experimental/filesystem/path.cpp
@@ -261,7 +261,8 @@ private:
string_view_pair separate_filename(string_view_t const & s) {
if (s == "." || s == ".." || s.empty()) return string_view_pair{s, ""};
auto pos = s.find_last_of('.');
- if (pos == string_view_t::npos) return string_view_pair{s, string_view{}};
+ if (pos == string_view_t::npos)
+ return string_view_pair{s, string_view_t{}};
return string_view_pair{s.substr(0, pos), s.substr(pos)};
}
@@ -396,7 +397,7 @@ int path::__compare(string_view_t __s) const {
size_t hash_value(const path& __p) noexcept {
auto PP = PathParser::CreateBegin(__p.native());
size_t hash_value = 0;
- std::hash<string_view> hasher;
+ std::hash<string_view_t> hasher;
while (PP) {
hash_value = __hash_combine(hash_value, hasher(*PP));
++PP;