mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
File: Add std::hash() template for juce::File
Adds compatibility with STL hash maps and hash sets
This commit is contained in:
parent
be58c6de30
commit
4593be7065
1 changed files with 10 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue