Problem with RootCint and templates in external headers

Dear ROOTers
I have a problem that is somewhat similar to this stated in this previous thread:

In my case I’m developing a class that needs to access an external library for which I do not have the dictionaries not the possibility to produce them, being that an external class. For this reason I’m compiling this code to wrap all the calls to the not ROOT library and to avoid problems in the writing to disk instances of this class the data member are all ROOT or STL types.
Anyway the header of my class includes some headers of this not ROOT library
When I compile the class everything goes smooth but as soon as I run rootcint I get the following error:

Internal error: global function template arg type {path}/Vector3D.h:35:

and the code around that line of that header is:

class Vector3D{
[...]
  /** Templated c'tor - allows to have overloaded c'tors for different coordinates */
  template <class T>
  Vector3D( double x,double y, double z , T(&)() ) ;
[...]
}; //End of class

I worked around this problem moving the includes related to this library to the source file and adding some forward declaration of the classes that I need in the header to be able to run rootcint without directly referencing the include paths for this library in the header but I don’t understand why the problem is there in the first place and if there is a solution to this problem that is not just a workaround.

Hi,

[quote]which I do not have the dictionaries not the possibility to produce them, being that an external class[/quote]Why not? In most case, you can generate the dictionary and the I/O without having to instrument the original header file at all!

[quote]but I don’t understand why the problem is there in the first place[/quote]My guess would be that in the lines{code]template
Vector3D( double x,double y, double z , T(&)() ) ;[/code]CINT does not parse correctly the 4th argument (a function reference …), this is one case where the ‘right’ solution is unfortunately to edit the header file and hide those line from CINT:#ifndef __CINT__ template <class T> Vector3D( double x,double y, double z , T(&)() ) ; #endif

Cheers,
Philippe.