Add hash specializations for __int128_t. Fixes LWG issue 2119
llvm-svn: 266587
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: df691e18f3bb1f18be8be93cea29fe3791c0f907
diff --git a/include/functional b/include/functional
index b4b95d4..4fcd4b5 100644
--- a/include/functional
+++ b/include/functional
@@ -2473,6 +2473,22 @@
{
};
+#ifndef _LIBCPP_HAS_NO_INT128
+
+template <>
+struct _LIBCPP_TYPE_VIS_ONLY hash<__int128_t>
+ : public __scalar_hash<__int128_t>
+{
+};
+
+template <>
+struct _LIBCPP_TYPE_VIS_ONLY hash<__uint128_t>
+ : public __scalar_hash<__uint128_t>
+{
+};
+
+#endif
+
template <>
struct _LIBCPP_TYPE_VIS_ONLY hash<float>
: public __scalar_hash<float>