1. [Multiple instantiations] Temp is instantiated in more than one
translation unit, so when the objs are linked together, the exe has
more than one copy of Temp’s member functions.
2. [Duplicate instantiations] Temp and Temp could be share a
single underlying binary implementation, but they don’t. The most
common example is when T1 and T2 are both pointer types, but it would
also apply if T1=int and T2=long on a machine where int and long are
the same size.
3. [Near-duplicate instantiations] Temp and Temp are
individually instantiated for non-type parameters n and m, even
though the resulting member functions are almost identical. This
would be the case for e.g., FixedSizeBuffer and
FixedSizeBuffer.
4. [Excessive inlining] Because many compilers require that all template
code be in header files, all such code is inlined, and that makes
executables bigger than they would be if template functions that are
large and frequently called could be outlined.
5. [Excessive instantiation] All the member functions of Temp are
instantiated, even though only a few are called. (This is
nonstandard behavior, but, at least in the past, it was a problem
with some compilers.)
6. [Gratuitous types] Temp and Temp are both instantiated, but
if templates didn’t exist, programmers would make do with a single
untemplatized implementation. For example, programmers instantiate
both Stack and Stack, but if they lacked templates, they’d
get by with only IntStack.
More at