summaryrefslogtreecommitdiff
path: root/grpc/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h')
-rw-r--r--grpc/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/grpc/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h b/grpc/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h
index 0683422a..250e662c 100644
--- a/grpc/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h
+++ b/grpc/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h
@@ -78,24 +78,26 @@ struct StringHash {
}
};
+struct StringEq {
+ using is_transparent = void;
+ bool operator()(absl::string_view lhs, absl::string_view rhs) const {
+ return lhs == rhs;
+ }
+ bool operator()(const absl::Cord& lhs, const absl::Cord& rhs) const {
+ return lhs == rhs;
+ }
+ bool operator()(const absl::Cord& lhs, absl::string_view rhs) const {
+ return lhs == rhs;
+ }
+ bool operator()(absl::string_view lhs, const absl::Cord& rhs) const {
+ return lhs == rhs;
+ }
+};
+
// Supports heterogeneous lookup for string-like elements.
struct StringHashEq {
using Hash = StringHash;
- struct Eq {
- using is_transparent = void;
- bool operator()(absl::string_view lhs, absl::string_view rhs) const {
- return lhs == rhs;
- }
- bool operator()(const absl::Cord& lhs, const absl::Cord& rhs) const {
- return lhs == rhs;
- }
- bool operator()(const absl::Cord& lhs, absl::string_view rhs) const {
- return lhs == rhs;
- }
- bool operator()(absl::string_view lhs, const absl::Cord& rhs) const {
- return lhs == rhs;
- }
- };
+ using Eq = StringEq;
};
template <>