Template instantiation effect on compile duration
问题 Writing template classes we have to inline the method bodies usually in .h files (unless instantiating them in .cpp files). We know modifying an inlined method requires recompiling the units which included them. It'll make compiling long. Another technique to implement a template class is instantiating it in a .cpp file. File Test.h : template <typename T> class Test { public: T data; void func(); }; File Test.cpp : template <typename T> void Test<T>::func() { } template class Test<float>; //