title: Do C++ template classes duplicate code for each pointer type used?
body: <p>From what I understand, if you have, for example, an <code>std::vector&lt;int&gt;</code> and an <code>std::vector&lt;float&gt;</code>, the compiler creates two classes, one for each type. Thus, although you reduce the amount of code written, you do not reduce executable size (correct me if I'm wrong).</p>
  
  <p>Is the same true even if the type is a pointer? For example, would instantiating an <code>std::vector&lt;SomeClass*&gt;</code> and an <code>std::vector&lt;SomeOtherClass*&gt;</code> necessarily cause the compiler to generate separate code for each of the two instantiations?</p>