title: Template or Inheritance
body: <p>Which one do you prefer more:</p>
  
  <pre><code>template &lt;class STRATEGY&gt;
  class A
  {
    STRATEGY *m_pMyStrategy; // User has to create new strategy class
  // class A needs to use traits 
  // or some other means to decide if strategy meets the requirements
  
  };
  </code></pre>
  
  <p>or </p>
  
  <pre><code>class A
  {
    IBaseStrategy *m_pMyStrategy; // User inherits IBaseStrategy class
  };
  </code></pre>
  
  <p>Why does std::vector choose the first one for allocator ?</p>