From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

drivers: stop using a deprecated, and unnecessary, base class

The std::unary_function was deprecated long ago (in C++11), but only
recently did gcc (12.1.1) start to complain. Since we don't even need
this type as a base class, we can just remove the reference to it.

This is one of the fixes needed to build on Fedora 36 (refs #1198).

Signed-off-by: Nadav Har'El <n...@scylladb.com>

---
diff --git a/drivers/pci-function.hh b/drivers/pci-function.hh
--- a/drivers/pci-function.hh
+++ b/drivers/pci-function.hh
@@ -357,7 +357,7 @@ namespace pci {
             }
         };
 
-        struct hash : std::unary_function< const function*, std::size_t> {
+        struct hash {
             std::size_t operator() ( const function* const key ) const {
                 return (size_t)((key->_device_id<<16)+ key->_vendor_id);
             }

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/000000000000b3ed5205e24c4f5d%40google.com.

Reply via email to