-
Templates generate multiple classes and multiple functions, so any template code not dependent on a template parameter causes bloat.
-
Bloat due to non-type template parameters can often be eliminated by replacing template parameters with function parameters or class data members.
-
Bloat due to type parameters can be reduced by sharing implementations for instantiation types with identical binary representations.
转载于:https://www.cnblogs.com/zhtf2014/archive/2011/04/06/2007176.html