Check out example codes for "template member functions in cpp files". It will help you in understanding the concepts better.

Code Example 1

template <class T>
void foo<T>::bar(const T &t)
{ }

// Explicit template instantiation
template class foo<int>;

Learn ReactJs, React Native from akashmittal.com