Can TF1 use a pointer to real function with const parameters

I would like to use const to define a TF1 based on a real function.

But when I use the following construct:

//prototype for my Gamma.
double gammaDistribution(const double *yVar, const double gammaPar[]);

//This line has compiler problems.
TF1 *gammaDist=new TF1(“Gamma_Distribution”,gammaDistribution,-2.,10.,4);

I get the following compiler error:
“call of overloaded `TF1(const char[19], double (&)(const double*, const double*),double, double, int)’ is ambiguous.”

But I get no compiler error if I remove the "const"s as I’ve done below.
double gammaDistribution( double *yVar, double gammaPar[]);

//This line now compilers.
TF1 *gammaDist=new TF1(“Gamma_Distribution”,gammaDistribution,-2.,10.,4);

I would like to protect the arguments passed to gammaDistribution with
the const qualifier.

Can I do this?


This might be possible. We may have back compatibility problems



The code in CVS can now be used to generate TF1, TF2 and TF3 object from function like: