implement std::hash<std::filesystem::path> for everything but windows

This commit is contained in:
matcool 2024-06-04 00:41:21 -03:00
parent 7860cb05ef
commit 4f6492da08

View file

@ -13,6 +13,16 @@
#include <charconv>
#include <clocale>
// only windows seems to properly implement std::hash on std::filesystem::path
#ifndef GEODE_IS_WINDOWS
template <>
struct std::hash<std::filesystem::path> {
std::size_t operator()(std::filesystem::path const& path) const noexcept {
return std::filesystem::hash_value(path);
}
};
#endif
namespace geode {
using ByteVector = std::vector<uint8_t>;