File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1223,4 +1223,20 @@ TEST(HashOf, MatchesTypeErasedHashState) {
1223
1223
TypeErasedHashStateUser{1 , s}));
1224
1224
}
1225
1225
1226
+ struct AutoReturnTypeUser {
1227
+ int a;
1228
+ std::string b;
1229
+
1230
+ template <typename H>
1231
+ friend auto AbslHashValue (H state, const AutoReturnTypeUser& value) {
1232
+ return H::combine (std::move (state), value.a , value.b );
1233
+ }
1234
+ };
1235
+
1236
+ TEST (HashOf, AutoReturnTypeUser) {
1237
+ std::string s = " s" ;
1238
+ EXPECT_EQ (absl::HashOf (1 , s),
1239
+ absl::Hash<AutoReturnTypeUser>{}(AutoReturnTypeUser{1 , s}));
1240
+ }
1241
+
1226
1242
} // namespace
Original file line number Diff line number Diff line change @@ -988,6 +988,8 @@ struct HashSelect {
988
988
size_t );
989
989
using State::HashStateBase::combine_contiguous;
990
990
static State combine_raw (State state, uint64_t value);
991
+ static State combine_weakly_mixed_integer (State hash_state,
992
+ WeaklyMixedInteger value);
991
993
};
992
994
993
995
struct UniquelyRepresentedProbe {
You can’t perform that action at this time.
0 commit comments