]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Stop using the now deprecated and useless std::binary_function 11197/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 17 Jan 2022 15:56:13 +0000 (16:56 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 17 Jan 2022 15:56:13 +0000 (16:56 +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.

pdns/dnsname.hh
pdns/dnssecinfra.hh
pdns/iputils.hh
pdns/misc.hh
pdns/zonemd.cc

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 627c6834994348412ad6adedcf627d33031e4e5c..dcd6ff717358fa0bd746369e4abba37bb5897da6 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 191e33d9fc02f3c8af587a6c47f7a81810408f31..d704bb3e2a9a152291fb8fcef56f832572f5a9e7 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 e83702d2d375f8992327a1acd58eb3261faf0c8c..92d8a2afc6457651c72fd49b4e1dff36d819a597 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
   {
index 51ac3d00ceef2c05a5064bfb2ad1cb329611d2f0..83552f8a002d794db25749eab1b02567a35a76e5 100644 (file)
@@ -8,7 +8,7 @@
 typedef std::pair<DNSName, QType> RRSetKey_t;
 typedef std::vector<std::shared_ptr<DNSRecordContent>> RRVector_t;
 
-struct CanonRRSetKeyCompare : public std::binary_function<RRSetKey_t, RRSetKey_t, bool>
+struct CanonRRSetKeyCompare
 {
   bool operator()(const RRSetKey_t& a, const RRSetKey_t& b) const
   {