I want to call a member function, passing it as a template parameter, without using boost. Here is an example of what I was trying to do,
class object { void method(); }
{
object object_instance;
...
apply<object:: method>();
...
template<class F>
void apply() { F(object_instance); }
}
which doesn't work, so the question is how do I go about binding the method of an object to an object. Thanks
Above is an example, not a real code. I have many functions that differ only in name, but with many parameters that I want to wrap in operators.
source
share