Add missing filesystem hash function... again
This commit is contained in:
parent
cf2cb655dc
commit
832e0efcc0
1 changed files with 11 additions and 0 deletions
|
@ -1,7 +1,18 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
namespace prism {
|
namespace prism {
|
||||||
using path = std::filesystem::path;
|
using path = std::filesystem::path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// some stdlibs such as apple's clang fail to provide this :-/
|
||||||
|
namespace std {
|
||||||
|
template <>
|
||||||
|
struct hash<prism::path> {
|
||||||
|
std::size_t operator()(const prism::path& k) const {
|
||||||
|
return (std::hash<std::string>()(k.string()));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
Reference in a new issue