It seems that there are (implicit) rules in which file I need to add a template class instantiation (template class X<Y>
).
It seems that I need to do this in the X.cpp
. If I do this in Y.cpp
(where I include X.h) then I get linker errors (undefined reference, no compiler errors).
The namespaces are the same. So why does it matter where in place this template class
?
Aucun commentaire:
Enregistrer un commentaire