Bug 1680469 - Remove partial std::hash specializations. r=jgilbert

Differential Revision: https://phabricator.services.mozilla.com/D98604
This commit is contained in:
Simon Giesecke 2020-12-09 16:47:13 +00:00
parent 0790cac85a
commit 71e2bbe153

View File

@ -13,24 +13,6 @@
#include <unordered_set>
#include <vector>
namespace std { // You know it's going to be good with this at the top of the
// file.
// The STL is lazy and doesn't provide these:
template <typename T>
struct hash<const T*> {
auto operator()(const T* const x) const {
return hash<T*>()(const_cast<T*>(x));
}
};
template <typename T>
struct hash<const T> {
auto operator()(const T x) const { return hash<T>()(const_cast<T>(x)); }
};
} // namespace std
// -
namespace mozilla {
@ -131,7 +113,7 @@ class CacheWeakMap final {
struct DerefHash final {
size_t operator()(const KeyT* const a) const {
return std::hash<const KeyT>()(*a);
return std::hash<KeyT>()(*a);
}
};
struct DerefEqual final {