From f86f9413856b65afdd61fea938d684b8ab73115a Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 25 Oct 2018 17:47:06 -0700 Subject: Export of internal Abseil changes. -- dabd5614eec687a27bcba28e1d98e84ce716f281 by Abseil Team : Demonstrate that std::bitset is supported by AbslHash, both with a comment and a test. PiperOrigin-RevId: 218782040 GitOrigin-RevId: dabd5614eec687a27bcba28e1d98e84ce716f281 Change-Id: I777d5e030ba8c6b8a2a353e29ace87484caa811f --- absl/hash/internal/hash.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/absl/hash/internal/hash.h b/absl/hash/internal/hash.h index 4543d679..b66cc1b5 100644 --- a/absl/hash/internal/hash.h +++ b/absl/hash/internal/hash.h @@ -494,6 +494,15 @@ AbslHashValue(H hash_state, const absl::variant& 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 (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() -- cgit v1.2.3