From: Peter van Dijk Date: Tue, 25 Jan 2022 15:51:46 +0000 (+0100) Subject: Stop using the now deprecated and useless std::binary_function X-Git-Tag: auth-4.6.1~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11235%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. (cherry picked from commit 7587bcbea8a9cb3058cb2e6d7f6a2597494b6713) --- 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 00f3befc06..eccd7c5b20 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 23b200b1a5..cca7714937 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 f08be7591c..3c8c5dbd6a 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 {