Consider the following code
class BASE
{
public:
virtual void test_f(){std::cout<<"BASE::test_f\n";}
};
class DERIVED:public BASE
{
public:
virtual void test_f(){std::cout<<"DERIVED::test_f\n";}
};
void (BASE::*p_base)() = &BASE::test_f;
p_base is a pointer to a class member function but it is polymorphic. That means that
DERIVED a;
(a.*p_base)();
will print DERIVED::test_f
How could i get the pointer to a test_f of the base class to make NON polymorphic call?