If you define a C++ template function in a namespace, the function definition needs to go in the header - not the
You could also put the implementation in .cpp and include this file from within the header file.
Template functions are not real functions - they are turned into a real function by the compiler when it encounters a use of the function.
This means that the template definition needs to be in the same scope as the call to the function. If the function is called in
utilities.h is included in this file, then the template must be defined in
comments powered by Disqus