Cast pointer to member function to normal pointer

You can’t call the member function directly. Member function pointers are not the same type as function pointers.

You’ll need to wrap it in a compatible function somehow. However, if your outer function (the one taking the function pointer as an argument) is not re-entrant and does not supply an extra argument for use by the function pointer, you won’t be able to pass the instance upon which the member function operates, so you won’t actually be able to make the call.

Leave a Comment