From 832e0efcc052b3d68ce2cd24b514f312fa8015c3 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 27 Jun 2022 10:08:20 -0400 Subject: [PATCH] Add missing filesystem hash function... again --- engine/utility/include/path.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/engine/utility/include/path.hpp b/engine/utility/include/path.hpp index 6449dcb..0e82120 100755 --- a/engine/utility/include/path.hpp +++ b/engine/utility/include/path.hpp @@ -1,7 +1,18 @@ #pragma once #include +#include namespace prism { using path = std::filesystem::path; } + +// some stdlibs such as apple's clang fail to provide this :-/ +namespace std { + template <> + struct hash { + std::size_t operator()(const prism::path& k) const { + return (std::hash()(k.string())); + } + }; +} \ No newline at end of file