Std::bind wrapped by TF1 is not supported since 6.10

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


Hi,

I can reproduce this issue. It is a problem with the internal template function GetTheRightOp with std::bind. Can you please open a JIRA item for this bug ?

Thank you

Lorenzo

Hi,

thanks, I opened the JIRA item: https://sft.its.cern.ch/jira/browse/ROOT-10251

Regards,
atd

Thank you we will investigate and try to fix this problem !

Lorenzo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.