Nothing actually gets compiled until you instantiate an actual instance of the template class. Therefore, it makes no sense to put the function definitions in a cpp
: they need to be visible to every compilation unit making use of the template.
The normal thing to do is to put the function definitions in the same header as the template declaration.
(You can put the whole of the template declarations and definitions in a source file but only if their sole use is in that file).