Index: third_party/WebKit/Source/wtf/HashFunctions.h |
diff --git a/third_party/WebKit/Source/wtf/HashFunctions.h b/third_party/WebKit/Source/wtf/HashFunctions.h |
index c3d90d02655a162d8249f943f79fab200715aa95..207c409a0d8583e43e9ba274822a87f95030c27c 100644 |
--- a/third_party/WebKit/Source/wtf/HashFunctions.h |
+++ b/third_party/WebKit/Source/wtf/HashFunctions.h |
@@ -198,21 +198,23 @@ struct DefaultHash; |
// Actual implementation of DefaultHash. |
// |
-// The case of |isIntegral| == false is not implemented. If you see a compile |
-// error saying DefaultHashImpl<T, false> is not defined, that's because the |
-// default hash functions for T are not defined. You need to implement them |
+// The case of |isIntegralOrEnum| == false is not implemented. If you see a |
+// compile error saying DefaultHashImpl<T, false> is not defined, that's because |
+// the default hash functions for T are not defined. You need to implement them |
// yourself. |
-template <typename T, bool isIntegral> |
+template <typename T, bool isIntegralOrEnum> |
struct DefaultHashImpl; |
template <typename T> |
struct DefaultHashImpl<T, true> { |
- using Hash = IntHash<typename std::make_unsigned<T>::type>; |
+ using Hash = IntHash<T>; |
}; |
// Canonical implementation of DefaultHash. |
template <typename T> |
-struct DefaultHash : DefaultHashImpl<T, std::is_integral<T>::value> {}; |
+struct DefaultHash |
+ : DefaultHashImpl<T, std::is_integral<T>::value || std::is_enum<T>::value> { |
+}; |
// Specializations of DefaultHash follow. |
template <> |