I’m wrote a template class and followed the instructions in Chapter 15 of the users’ guide. Therefore, the header contains:
The implementation file has:
Finally in the linkdef file I added the line:
Upon compiling I received the following error.
[quote]include/DataSetPlotter.hh: In member function ‘virtual TClass* Flux::DataSetPlotter::IsA() const’:
include/DataSetPlotter.hh:126: error: ‘template class Flux::DataSetPlotter’ used without template parameters
include/DataSetPlotter.hh: In member function ‘void Flux::DataSetPlotter::StreamerNVirtual(TBuffer&)’:
include/DataSetPlotter.hh:126: error: ‘template class Flux::DataSetPlotter’ used without template parameters[/quote]
Where line 126 contains the ClassDef macro.
Perhaps somewhat naively I tried the obvious fix and replaced Classdef statement with:
Now the code compiles and links fine, but I’m concerned that the problem isn’t really fixed, and I have just masked the underlying issue with a fudge. Is the definition in the manual incomplete or is this a compiler related problem?