Fixed UBsan warning "call to function through pointer to incorrect function type"
[libcds.git] / cds / details / static_functor.h
index 2df6419a45be90f8d3cc12732ea0afc17a0a41cf..52986bccceb6e7bfb6682cce6e3c331b9f5e997f 100644 (file)
@@ -37,9 +37,9 @@ namespace cds { namespace details {
     template <class Functor, typename T>
     struct static_functor
     {
-        static void call( * p )
+        static void call( void* p )
         {
-            Functor()( );
+            Functor()( reinterpret_cast<T*>( p ));
         }
     };