I reply to myself: pointers to functions and to member functions are incompatible.
Possible solution: define a templated version of this function to use pointers to member function.
Is this possible?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way to call quad from a class using a function which is a member of that class?
Minimal example:
class Example
{
double fct_to_int(const double x);
double integrate(double a, double b);
};
double integrate(double a, double b)
{
return quad(fct_to_int, a, b);
}
I reply to myself: pointers to functions and to member functions are incompatible.
Possible solution: define a templated version of this function to use pointers to member function.
Is this possible?