title: How to use containers for template instances
body: <p>I want to store the template instance using adapter pattern, it doesn't compile.
  Can someone help me hear to compile.</p>
  <pre><code>class Shape_Adapter
  {
      public:
          void draw() { Shape.draw() ; }
      private:
          T Shape;
  };
  class Circle 
  {
      public:
          void draw() { cout &lt;&lt; &quot;Drawing Circle&quot; &lt;&lt; endl; }
  };
  
  class Square
  {
      public:
          void draw() { cout &lt;&lt; &quot;Drawing Square&quot; &lt;&lt; endl; }
  };
  
  
  Shape_Adapter&lt;Circle&gt; cir;
  Shape_Adapter&lt;Square&gt; sqr;
  
      cir.draw(); //Works
      sqr.draw(); // Works
      
      map&lt;int, Shape_Adapter*&gt; mapIdToShape; // But this fails
  </code></pre>