I want to use the gnu scientific library for minimization, but I want to wrap it in an adaptor so that I can easily use a different implementation without changing my code if I want to. The interface should take an argument double (*myFunction)(double* args), but the library requires an argument of the form double (* gsl_function)(gsl_vector* newArgs). I tried to take the input function pointer and use it to define a member function of the form double (* gsl_function)(gsl_vector* newArgs), but this fails because double optim::(* gsl_function)(gsl_vector* newArgs) is not the same as the expected double (* gsl_function)(gsl_vector* newArgs). My code is below.