]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Stop using the now deprecated and useless std::binary_function 11235/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 25 Jan 2022 15:51:46 +0000 (16:51 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 25 Jan 2022 15:51:46 +0000 (16:51 +0100)
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
pdns/dnssecinfra.hh
pdns/iputils.hh
pdns/misc.hh

index 76981f513a870c26e70933d268a8eadcebc0cea6..868eb963fd0ca77b17f4f429f861dea3df8b6790 100644 (file)
@@ -237,7 +237,7 @@ inline bool DNSName::canonCompare(const DNSName& rhs) const
 }
 
 
-struct CanonDNSNameCompare: public std::binary_function<DNSName, DNSName, bool>
+struct CanonDNSNameCompare
 {
   bool operator()(const DNSName&a, const DNSName& b) const
   {
index 00f3befc061fe19988a6b9114a4776df54a0a7ba..eccd7c5b20afe8fc6f9795e61c0b2c36f025a469 100644 (file)
@@ -137,7 +137,7 @@ private:
 
 
 
-struct CanonicalCompare: public std::binary_function<string, string, bool>  
+struct CanonicalCompare
 {
   bool operator()(const std::string& a, const std::string& b) {
     std::vector<std::string> avect, bvect;
index 23b200b1a5375fa69f6f7f609d2614f155176190..cca77149372fe59538567d71ef785d249bbccbe7 100644 (file)
@@ -143,7 +143,7 @@ union ComboAddress {
     }
   };
 
-  struct addressOnlyLessThan: public std::binary_function<ComboAddress, ComboAddress, bool>
+  struct addressOnlyLessThan
   {
     bool operator()(const ComboAddress& a, const ComboAddress& b) const
     {
@@ -158,7 +158,7 @@ union ComboAddress {
     }
   };
 
-  struct addressOnlyEqual: public std::binary_function<ComboAddress, ComboAddress, bool>
+  struct addressOnlyEqual
   {
     bool operator()(const ComboAddress& a, const ComboAddress& b) const
     {
index f08be7591c0d67fdb166751f78c54fca8e56a116..3c8c5dbd6a3e9f86fbb4dfc45ce631c921a484f3 100644 (file)
@@ -381,7 +381,7 @@ typedef unsigned long AtomicCounterInner;
 typedef std::atomic<AtomicCounterInner> AtomicCounter ;
 
 // FIXME400 this should probably go? 
-struct CIStringCompare: public std::binary_function<string, string, bool>
+struct CIStringCompare
 {
   bool operator()(const string& a, const string& b) const
   {
@@ -405,7 +405,7 @@ struct CIStringComparePOSIX
    }
 };
 
-struct CIStringPairCompare: public std::binary_function<pair<string, uint16_t>, pair<string,uint16_t>, bool>
+struct CIStringPairCompare
 {
   bool operator()(const pair<string, uint16_t>& a, const pair<string, uint16_t>& b) const
   {