// Build don't link: template void f(T) {} template struct S { static T t; }; template T S::t; template void f(int); template void f(int); // ERROR - duplicate explicit instantiation template int S::t; template int S::t; // ERROR - duplicate explicit instantiation template class S; template class S; // ERROR - duplicate explicit instantiation extern template void f(double); // WARNING - extern not allowed inline template class S; // WARNING - inline not allowed template struct S {}; template class S; // OK - explicit instantiation of partial // specialization template <> struct S {}; template class S; // OK - explicit instantiation after template <> void f(long double) {} template void f(long double); // OK - explicit instantiation after template void g(T); template void g(int); // ERROR - no definition of g.