Hello,
I am attempting to pass external variables into the lambda function for my RDataframe object, I am working on a simple test using python and the c++ snippet is written:
ROOT.gInterpreter.Declare(
'''
std::string hh="hello";
auto flipper = [&hh]( double pt_in , double eta_in ) {
std::cout<<hh<<std::endl;
std::cout<<"test"<<std::endl;
return pt_in;
};
'''
)
However I have gotten the error:
error: ‘hh’ cannot be captured because it does not have automatic storage duration
if i go full fledged c++ it work. Is this behavior expected? thanks.
Siewyan
ROOT Version: 6.22
Platform: Not Provided
Compiler: Not Provided