summaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/stllike/hash_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib/src/tests/stllike/hash_test.cpp')
-rw-r--r--vespalib/src/tests/stllike/hash_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/vespalib/src/tests/stllike/hash_test.cpp b/vespalib/src/tests/stllike/hash_test.cpp
index 4feeaef8349..017a16ee7b6 100644
--- a/vespalib/src/tests/stllike/hash_test.cpp
+++ b/vespalib/src/tests/stllike/hash_test.cpp
@@ -341,11 +341,11 @@ private:
struct myhash {
size_t operator() (const S & arg) const { return arg.hash(); }
+ size_t operator() (uint32_t arg) const { return arg; }
};
-struct myextract {
- uint32_t operator() (const S & arg) const { return arg.a(); }
-};
+bool operator == (uint32_t a, const S & b) { return a == b.a(); }
+bool operator == (const S & a, uint32_t b) { return a.a() == b; }
TEST("test hash set find")
{
@@ -354,7 +354,7 @@ TEST("test hash set find")
set.insert(S(i));
}
EXPECT_TRUE(*set.find(S(1)) == S(1));
- hash_set<S, myhash>::iterator cit = set.find<uint32_t, myextract, vespalib::hash<uint32_t>, std::equal_to<uint32_t> >(7);
+ auto cit = set.find<uint32_t>(7);
EXPECT_TRUE(*cit == S(7));
}