I guess that when you use a template, you generally define the methods in that header file itself. This is because the template instantiation will need the class declaration and definition. So it's better to put the template related things inside a single file and use that.