Dear rooters,
It seems that TF1 does not admit a “std::bind” as argument since v6.10. The following code works in 6.10, but not in newer versions,
originalFF = [](double *x , double *par){ (void)par; return *x; }; // original function; it can be a functor, a proper function, a lambda...
boundFF = std::bind (originalFF,std::placeholders::_1, std::placeholders::_2);
TF1 myFitFunct("myFitFunct", shoddyFF,0, 1 , 0 )
It seems TF1 still admits lambda functions as arguments; this example works also in newer versions
originalFF = [](double *x , double *par){ (void)par; return *x; };
boundFF = std::bind (originalFF,std::placeholders::_1, std::placeholders::_2);
intermediateFF = [](double *x , double *par){ return boundFF(x, par); } // extra step in order to use std::bind with TF1
TF1 myFitFunct("myFitFunct", intermediateFF,0, 1 , 0 )
Am I doing something wrong? Is it a ROOT issue?
Thank you for your time.
Regards,
atd
ROOT Version: 6.10, 6.18
Platform: CC7
Compiler: gcc 4.8.5