I was wondering if ROOT (i.e. rootcling) can do the following for me: generate the LinkDef entries for all the class template instances (that either derive from TObject or have a ClassDef macro) in my program. Or maybe have some kind of a wildcard functionality to avoid long lists of class template entries in my LInkDef file. This because I am facing the following situation:
I have several class templates such as
MyClass<T, N> that take one or more template arguments. I want to do I/O with instances of these classes, but I find myself to have to list all the used combination of parameters in my LinkDef.h; otherwise rootcling will complain about
undefined references of its
Streamer() methods (which are only generated in the dictionary when I enlist them in the LinkDef).
Is it possible for rootcling to just generate the entries of these class template instances, instead of complaining about them? Since all the used template instances are known at compile time this should in theory be possible. Or if it already is, how do I do it?
Looking forward to a reply!