From 6dc3d9c540f1b50a19ed66e5c3776bba7c300a97 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Tue, 25 Jan 2022 16:51:46 +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. (cherry picked from commit 7587bcbea8a9cb3058cb2e6d7f6a2597494b6713) --- pdns/dnsname.hh | 2 +- pdns/dnssecinfra.hh | 2 +- pdns/iputils.hh | 4 ++-- pdns/misc.hh | 4 ++-- 4 files changed, 6 insertions(+), 6 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 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 { -- 2.47.2