From 7587bcbea8a9cb3058cb2e6d7f6a2597494b6713 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 17 Jan 2022 16:56:13 +0100 Subject: [PATCH] Stop using the now deprecated and useless std::binary_function It is no longer needed since the types can now be automatically deduced, has been deprecated in C++11 and removed in C++17. --- pdns/dnsname.hh | 2 +- pdns/dnssecinfra.hh | 2 +- pdns/iputils.hh | 4 ++-- pdns/misc.hh | 4 ++-- pdns/zonemd.cc | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pdns/dnsname.hh b/pdns/dnsname.hh index 76981f513a..868eb963fd 100644 --- a/pdns/dnsname.hh +++ b/pdns/dnsname.hh @@ -237,7 +237,7 @@ inline bool DNSName::canonCompare(const DNSName& rhs) const } -struct CanonDNSNameCompare: public std::binary_function +struct CanonDNSNameCompare { bool operator()(const DNSName&a, const DNSName& b) const { diff --git a/pdns/dnssecinfra.hh b/pdns/dnssecinfra.hh index 627c683499..dcd6ff7173 100644 --- a/pdns/dnssecinfra.hh +++ b/pdns/dnssecinfra.hh @@ -137,7 +137,7 @@ private: -struct CanonicalCompare: public std::binary_function +struct CanonicalCompare { bool operator()(const std::string& a, const std::string& b) { std::vector avect, bvect; diff --git a/pdns/iputils.hh b/pdns/iputils.hh index 191e33d9fc..d704bb3e2a 100644 --- a/pdns/iputils.hh +++ b/pdns/iputils.hh @@ -143,7 +143,7 @@ union ComboAddress { } }; - struct addressOnlyLessThan: public std::binary_function + struct addressOnlyLessThan { bool operator()(const ComboAddress& a, const ComboAddress& b) const { @@ -158,7 +158,7 @@ union ComboAddress { } }; - struct addressOnlyEqual: public std::binary_function + struct addressOnlyEqual { bool operator()(const ComboAddress& a, const ComboAddress& b) const { diff --git a/pdns/misc.hh b/pdns/misc.hh index e83702d2d3..92d8a2afc6 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -381,7 +381,7 @@ typedef unsigned long AtomicCounterInner; typedef std::atomic AtomicCounter ; // FIXME400 this should probably go? -struct CIStringCompare: public std::binary_function +struct CIStringCompare { bool operator()(const string& a, const string& b) const { @@ -405,7 +405,7 @@ struct CIStringComparePOSIX } }; -struct CIStringPairCompare: public std::binary_function, pair, bool> +struct CIStringPairCompare { bool operator()(const pair& a, const pair& b) const { diff --git a/pdns/zonemd.cc b/pdns/zonemd.cc index 51ac3d00ce..83552f8a00 100644 --- a/pdns/zonemd.cc +++ b/pdns/zonemd.cc @@ -8,7 +8,7 @@ typedef std::pair RRSetKey_t; typedef std::vector> RRVector_t; -struct CanonRRSetKeyCompare : public std::binary_function +struct CanonRRSetKeyCompare { bool operator()(const RRSetKey_t& a, const RRSetKey_t& b) const { -- 2.47.2