C++ compilers handled templates very well for me in the late 1990's.
I wrote template headers in such a way that they could be included into a common .cc file, where template instantiations could be placed. By defining some #define symbol prior to including a template header, I would force it to supply the definitions. Without the #define, no other translation unit had access to the template bodies, and so generating bloat couldn't happen. (Another way is to have two headers: foo.h for the template declaration and foo-impl.h for the bodies of the template functions: foo-impl.h is only included in the translation unit that instantiates.)
If the templates for different types are instantiated in the same translation unit, that maximizes the opportunity that the code for identical expansions can be merged (if the compiler supports it). But more importantly, you control the bloat through the discipline of having a catalog of explicit expansions.
I avoided code bloat not only by using the above trick, but simply by writing light-weight templates. Templates cause particular bloat when they are inlined, because inline functions cause bloat, and inline templates generate them. The solution: don't put anything into the body of a template function that you wouldn't put into an inline function. Secondly, make the tiny inline template function rely only on non-template pieces to do its job. Sometimes designing this way creates a type-fragile implementation. However, if that code is used properly through the templates (and only through the templates), then it is safe.
Perhaps C++ compilers handle templates better now in the sense of managing the expansion more transparently and merging some of the bloat; but manual techniques have worked well for a long time.