this trick can also be applied by STL vendors to minimize code bloat for container's holding pointers. when this is applied we do not have gull-blown symbols for std::vector<int*> and std::vector<char*>, but just std::vector<void*> (or similar) that is wrapped around in proper casts to ensure type safety. this all can be inlined then and binary gets smaller for free. this trick is called thin template.

recently i've learned about one more interesting trick: SCARY iterators (paper with full description and measurements). the idea is to keep all iterators of the same concept (ex. random access iterators) the be of the same type. it can further minimize code bloat on code where iterators are used. this usually mean algorithms. idea is not new, but probably worth trying (AFAIC MSVC implements it already). it has also been proposed to become a part of the standard.