To make available some useful function in CINT (C++ interpreter of ROOT), I configured my rootrc config file to execute a rootlogon.C file each time I run root to launch the interpreter.
This line is kind of working as intented since I’m then able to access most of the defined function in the header file. However the functions involving template can’t be accessed. I understand that because this is a header-only library, the interpreter can’t predict which object types will be used as template definition.
So do you know if I could make a kind of shared library that could be loaded in the rootlogon, which would define specific template functions?
I’ve seen some examples suggesting to utilize a LinkDef.h file which contains #pragma link C++ function lines to specialize templates, but I don’t understand how to use it…
The only thing is when I type “tab” to list the availables functions, the template functions are not printed!
But when I try to call for a template function, it actually works.
Do you know if this auto-completion print issue is known and can be fixed?
It is (likely) the “intended” behavior. Tab can only list concrete classes/functions and already instantiated class/function template. I suppose we could enhance it a bit by also listing the generic part of the templates.