Following up on my previous post (https://root-forum.cern.ch/t/generate-linkdef-entries-for-class-or-function-template-instances/24666) I have still not figured out how to generate Streamers for class template instances in an non-explicit manner. The reason for this is that we do not want to let every developer on the project to take care of listing the class instance in the LinkDef.
In the ROOT documentation I read the following about the LinkDef pragmas:
The [classname] and the [name] can also contain wildcards. For example:
#pragma link C++ class MyClass*;
This will request the dictionary for all the class whose name start with 'MyClass' and are already known to CINT (class templates need to have already been instantiated to be considered).
I do not understand what is meant by "class templates need to have already been instantiated to be considered".
If I have
MyClass<double> instantiated in my_header.h, and I feed this into rootcling to generate the dictionary. When I have in my LinkDef.h:
#pragma link C++ class MyClass<int>+;
#pragma link C++ class MyClass<double>+;
The Streamers for both are generated, but when I do:
#pragma link C++ class MyClass*+;
No Streamers are generated.
Should this work? And if so, how can I make it work?