title: C++ std::map of template-class values
body: <p>I'm attempting to declare a <code>Row</code> and a <code>Column</code> class, with the <code>Row</code> having a private <code>std::map</code> with values pointing to a templated <code>Column</code>. Something like this:</p>
  
  <pre><code>template &lt;typename T&gt; class DataType {
    private:
      T type;
  };
  template &lt;typename T&gt; class Field {
    private:
      T value;
      DataType&lt;T&gt; type;
  };
  class Row {
    private:
      std::map&lt;unsigned long,Field*&gt; column;
  }; 
  </code></pre>
  
  <p>Well, I suppose in principle the <code>Row</code> class shouldn't have to know which kind of <code>Field</code> (or <code>Column</code>) we'd like to use, i.e. whether it's a <code>Field&lt;int&gt;</code> in column 1 or a <code>Field&lt;double&gt;</code> in column 2. But I'm not sure what's the correct syntax for the <code>Row::column</code> declaration, or if the <code>std::map</code> is limited in this sense and I should be using something else.</p>
  
  <p>I appretiate you suggestions and thank you for them in advance.</p>