FairRoot
FairRoot copied to clipboard
Can `FairRootManager::RegisterAny` consume `T*` instead of `T*&` as second argument?
Followup on one aspect identified in #789.
Disadvantages of T*&:
- If people want to register object that are referenced by a smart pointer, they are currently told to extract the raw pointer and extend its lifetime with a local static variable.
- The calling method will effectively only work once.
- You cannot pass rvalues.
I agree that there is room for improvement here and I appreciate the initiative. I remember it simply did not work with just T*. Some limitations come in my understanding from the way you need to pass addresses to the TBranch.