summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-02-25 16:12:43 +0100
committerTor Egge <Tor.Egge@online.no>2022-02-25 16:12:43 +0100
commit80d85ead3add9e63a6654d78b3ed6eb056b961a6 (patch)
tree068ef52c34c36906372a3548d0b4089323dc5ff0 /vespalib
parent0ca11c3ea9e563f331f552c18ae8a135060865e5 (diff)
Stop using std::unary_function and std::binary_function.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/stllike/hashtable_test.cpp4
-rw-r--r--vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/vespalib/src/tests/stllike/hashtable_test.cpp b/vespalib/src/tests/stllike/hashtable_test.cpp
index 74490e413d1..ccb1136729e 100644
--- a/vespalib/src/tests/stllike/hashtable_test.cpp
+++ b/vespalib/src/tests/stllike/hashtable_test.cpp
@@ -17,7 +17,7 @@ using namespace vespalib;
namespace {
template<typename T>
-struct Dereference : std::unary_function<T, std::unique_ptr<T>> {
+struct Dereference {
T &operator()(std::unique_ptr<T>& p) const { return *p; }
const T& operator()(const std::unique_ptr<T>& p) const { return *p; }
};
@@ -119,7 +119,7 @@ TEST("require that you can insert duplicates") {
}
template<typename To, typename Vector>
-struct FirstInVector : std::unary_function<To, Vector> {
+struct FirstInVector {
To &operator()(Vector& v) const { return v[0]; }
const To& operator()(const Vector& v) const { return v[0]; }
};
diff --git a/vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp b/vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp
index 86c3dc1411c..7b9dfc98fa5 100644
--- a/vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp
+++ b/vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp
@@ -92,7 +92,7 @@ private:
Gid _gid;
};
-struct IndirectCmp : public std::binary_function<Slot*, Slot*, bool> {
+struct IndirectCmp {
bool operator() (const Slot* s1, const Slot* s2) noexcept {
return s1->cmp(*s2) < 0;
}