Archived
1
Fork 0

Add missing filesystem hash function... again

This commit is contained in:
Joshua Goins 2022-06-27 10:08:20 -04:00
parent cf2cb655dc
commit 832e0efcc0

View file

@ -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()));
}
};
}