5353
5454#include " absl/base/config.h"
5555#include " absl/hash/hash.h"
56- #include " absl/strings/cord.h"
5756#include " absl/strings/string_view.h"
5857
5958namespace absl {
6059ABSL_NAMESPACE_BEGIN
60+
61+ class Cord ;
62+
6163namespace container_internal {
6264
6365// The hash of an object of type T is computed by using absl::Hash.
@@ -73,25 +75,17 @@ struct StringHash {
7375 size_t operator ()(absl::string_view v) const {
7476 return absl::Hash<absl::string_view>{}(v);
7577 }
76- size_t operator ()(const absl::Cord& v) const {
77- return absl::Hash<absl::Cord>{}(v);
78- }
78+ size_t operator ()(const absl::Cord& v) const ;
7979};
8080
8181struct StringEq {
8282 using is_transparent = void ;
8383 bool operator ()(absl::string_view lhs, absl::string_view rhs) const {
8484 return lhs == rhs;
8585 }
86- bool operator ()(const absl::Cord& lhs, const absl::Cord& rhs) const {
87- return lhs == rhs;
88- }
89- bool operator ()(const absl::Cord& lhs, absl::string_view rhs) const {
90- return lhs == rhs;
91- }
92- bool operator ()(absl::string_view lhs, const absl::Cord& rhs) const {
93- return lhs == rhs;
94- }
86+ bool operator ()(const absl::Cord& lhs, const absl::Cord& rhs) const ;
87+ bool operator ()(const absl::Cord& lhs, absl::string_view rhs) const ;
88+ bool operator ()(absl::string_view lhs, const absl::Cord& rhs) const ;
9589};
9690
9791// Supports heterogeneous lookup for string-like elements.
@@ -157,6 +151,9 @@ template <class T>
157151using hash_default_eq = typename container_internal::HashEq<T>::Eq;
158152
159153} // namespace container_internal
154+
155+ #include " absl/container/internal/hash_function_cord.h"
156+
160157ABSL_NAMESPACE_END
161158} // namespace absl
162159
0 commit comments