how can I define member functions of a class template in a cpp file, not the class declaration header file?
I've tried:
//class.h file
template <class T>
class A{
public:
A();
T get_data();
private:
T data;
};
//cpp file
template <class T>
A<T>::A(){}
template <class T>
T A<T>::get_data() { return data; }
but I get undefined refrence to... compilation-time error.
Is there any way to do this?