From: Remi Gacogne Date: Mon, 17 Jan 2022 15:56:13 +0000 (+0100) Subject: Stop using the now deprecated and useless std::binary_function X-Git-Tag: auth-4.7.0-alpha1~50^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11197%2Fhead;p=thirdparty%2Fpdns.git 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. --- 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 {