about summary refs log tree commit diff
path: root/absl/hash/internal/hash.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-26T00·47-0700
committerAshley Hedberg <ahedberg@google.com>2018-10-26T18·43-0400
commitf86f9413856b65afdd61fea938d684b8ab73115a (patch)
treebdde938bece247016c513e120a02b828e69cc4cc /absl/hash/internal/hash.h
parent94c298e2a0ae409e283cab96c954a685bd865a70 (diff)
Export of internal Abseil changes.
--
dabd5614eec687a27bcba28e1d98e84ce716f281 by Abseil Team <absl-team@google.com>:

Demonstrate that std::bitset is supported by AbslHash, both with a comment and
a test.

PiperOrigin-RevId: 218782040
GitOrigin-RevId: dabd5614eec687a27bcba28e1d98e84ce716f281
Change-Id: I777d5e030ba8c6b8a2a353e29ace87484caa811f
Diffstat (limited to 'absl/hash/internal/hash.h')
-rw-r--r--absl/hash/internal/hash.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/absl/hash/internal/hash.h b/absl/hash/internal/hash.h
index 4543d679a837..b66cc1b5f92b 100644
--- a/absl/hash/internal/hash.h
+++ b/absl/hash/internal/hash.h
@@ -494,6 +494,15 @@ AbslHashValue(H hash_state, const absl::variant<T...>& v) {
   }
   return H::combine(std::move(hash_state), v.index());
 }
+
+// -----------------------------------------------------------------------------
+// AbslHashValue for Other Types
+// -----------------------------------------------------------------------------
+
+// AbslHashValue for hashing std::bitset is not defined, for the same reason as
+// for vector<bool> (see std::vector above): It does not expose the raw bytes,
+// and a fallback to std::hash<> is most likely faster.
+
 // -----------------------------------------------------------------------------
 
 // hash_range_or_bytes()