Is it possible to call a static template function that is not a member from a static member function, where the definition is split into a header and cpp:
class Zero
{
static void zero() { one(5); }
};
template <typename T>
static void one(T& var);
template <typename T>
void one(T& var) { }
...
Zero::zero()
...
I am having problems with this to bind, I keep getting an undefined reference to the function that I am trying to define in one.cpp.
Initially, I thought this was due to a problem with the namespace, but all the files are now in the same namespace. Am I doing something fundamentally wrong here?
source
share