about summary refs log tree commit diff
path: root/absl/numeric/int128.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/numeric/int128.h')
-rw-r--r--absl/numeric/int128.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/absl/numeric/int128.h b/absl/numeric/int128.h
index 2d131b8bda1c..79b62a758669 100644
--- a/absl/numeric/int128.h
+++ b/absl/numeric/int128.h
@@ -192,6 +192,12 @@ class
   // Returns the highest value for a 128-bit unsigned integer.
   friend constexpr uint128 Uint128Max();
 
+  // Support for absl::Hash.
+  template <typename H>
+  friend H AbslHashValue(H h, uint128 v) {
+    return H::combine(std::move(h), Uint128High64(v), Uint128Low64(v));
+  }
+
  private:
   constexpr uint128(uint64_t high, uint64_t low);