I have a class called A and a function that needs to have a template. It is declared like this in the header:
class A{
public:
template <SIDE S>
void foo();
}
And in the source file:
template<SIDE S>
void A::foo(){
/* ... */
}
But this results in a linker error (LNK2001 for MSVC).
How do I solve this? It will be pretty cumbersome to have to repeat code for one function if templates doesn't work...