Saving std::function

Hi, Experts
Is it possible to save std::function as an member of TObject?
I tried to save class with std::function < double(TLorentzVector*)>, code is compiled but when I trie to save object I get errors and warnings:

Warning in <TStreamerInfo::Build>: _Maybe_unary_or_binary_function<double,TLorentzVector*>: base class unary_function<TLorentzVector*,double> has no streamer or dictionary it will not be saved
Warning in <TStreamerInfo::Build>: function<double(TLorentzVector*)>: base class _Maybe_unary_or_binary_function<double,TLorentzVector*> has no streamer or dictionary it will not be saved
Error in <TStreamerInfo::Build>: _Function_base, unknown type: _Any_data _M_functor

Error in <TStreamerInfo::Build>: _Function_base, unknown type: bool(*)(_Any_data&,const _Any_data&,_Manager_operation) _M_manager

Warning in <TStreamerInfo::Build>: function<double(TLorentzVector*)>: base class _Function_base has no streamer or dictionary it will not be saved
Error in <TStreamerInfo::Build>: function<double(TLorentzVector*)>, unknown type: double(*)(const _Any_data&,TLorentzVector*&&) _M_invoker

[SimpleLinkDef.h|attachment](upload://y8LXP2xjyeJBPoyZpm2MsnHLcnP.h) (254 bajty)
[StdFunc.cpp|attachment](upload://AhkjLQ4CXuy1hHwvqjzkJwmeCks.cpp) (68 bajtów)
[StdFunc.h|attachment](upload://29YhSBhaS3yf1BMpmfP9bO0BrD8.h) (636 bajtów)
[write.cpp|attachment](upload://cxtYNW7NvTWA1YZ9gcIY4ka0PaO.cpp) (1,0 KB)

Hi,

This section of the manual might be useful for you:

@pcanal can answer to the specific question of std::function.

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