Make BorrowedPtr hashable.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-06-02 16:03:47 +02:00
parent 4323e59ed4
commit 893aa969d5
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 8 additions and 0 deletions

View File

@ -52,4 +52,12 @@ namespace ArbUt {
}; };
} }
namespace std {
template <class T> struct hash<ArbUt::BorrowedPtr<T>> {
std::size_t operator()(const ArbUt::BorrowedPtr<T>& k) const { return (size_t)k.GetRaw(); }
};
}
#endif // ARBUTILS_BORROWEDPTR_HPP #endif // ARBUTILS_BORROWEDPTR_HPP