Please consider this example, how do we force implicit conversion in function whose second parameter is pointer to member function. casting explicitly in argument list of functi
As clean as it gets. Code below. But I have no idea who's "this" pointer is going to be referenced when "temp" actually gets invoked.
typedef void(Base::*polymorph)();
void func(Base* arg1, polymorph arg2)
{
polymorph temp = arg2;
}
int main()
{
Derived* test = new Derived;
// first parameter work but another gives an error
func(test, static_cast<polymorph>(&Derived::f));
delete test;
return 0;
}