1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

File: Add std::hash() template for juce::File

Adds compatibility with STL hash maps and hash sets
This commit is contained in:
Daniel Leonov 2025-10-13 20:21:50 +03:00
parent be58c6de30
commit 4593be7065

View file

@ -1187,3 +1187,13 @@ private:
};
} // namespace juce
/** @cond */
namespace std
{
template <> struct hash<juce::File>
{
size_t operator() (const juce::File& f) const noexcept { return (size_t) f.hashCode64(); }
};
}
/** @endcond */