using extern template (C++11) to avoid instantiation
You should only use extern template to force the compiler to not instantiate a template when you know that it will be instantiated somewhere else. It is used to reduce compile time and object file size. For example: // header.h template<typename T> void ReallyBigFunction() { // Body } // source1.cpp #include “header.h” void something1() { … Read more