明确实例化点。例如
template void f(T& t) { g(t);}class A{};void g(const A& a); // 函数1template <> void f(A& t); // 显式实例化void g(A& a) { // 函数2 f(a); // 调用函数1,因为显式实例化时函数2 还没有声明 // 如果没有显式实例化则调用函数2,即无穷递归}