title: c++: declare template as a class member
body: <p>i want a <code>node</code> class to build a tree. <code>node</code> is a template class with template arguements <code>_Data</code> and <code>_Container</code>. For no recursion in template arguements, i let <code>_Container</code> be a template class instand of a class. i declare <code>typedef _Data data_type</code> in <code>node</code>, and want to use <code>node::container_type</code> like <code>node::data_type</code>. How can i do?</p>
  
  <pre><code>template&lt;
      typename
          _Data,
      template&lt;typename T&gt; class
          _Container = std::vector&gt;
  struct node
  {
      typedef _Data data_type;
  
      //TODO container_type
  
      typedef node&lt;_Data, _Container&gt; type;
      typedef std::shared_ptr&lt;type&gt; ptr;
      typedef _Container&lt;ptr&gt; ptrs;
      Data data;
      ptrs children;
  };
  </code></pre>