I am trying to create a pointer to a member function which has default arguments. When I call through this function pointer, I do not want to specify an argument for the de
You could create functors instead of function pointers of course.
struct MyFunctor { int operator() { return myobj.bar(); } MyFunctor(MyObj &obj) : myobj(obj) {} MyObj &myobj; };
then:
MyFunctor myfunc(o); myFunctor();