Quote:Original post by Washu
You can't do that with templates without support for the extern keyword. You'll either need to include the definition in the header file, or include the .cpp file implementation file, which should be renamed to something not ending with .cpp into the header.
Fixed. I would use something along the lines of .impl.hpp, since your IDE is probably already configured to treat .hpp files as C++ code. But #including .cpp files is just asking for more linker troubles -- namely, duplicate symbol errors the moment you define a non-template function/variable in the .cpp file, as people usually expect to be able to do with .cpp files.
...if it wasn't already obvious, you'll also have to put any of the aforementioned non-template function/variables into a different file, for the exact aforementioned reasons :).