Instantiating a template class with typename itself being a template class
<p>I want to know how should I initialize a template class where the typename itself is having templates. The class that I want to initialize is as follows: </p>

<pre><code>typedef TVec&lt;TPair &lt;TInt, TLst&lt;TInt&gt;&gt; &gt; TMyType;
</code></pre>

<p>I am just instantiating my object with the default constructor (i.e. empty parenthesis) and would like to know will it also instantiate the TPair and TLst types that are within the typename?
For example, can I instantiate simply as below?</p>

<pre><code>TMyType myClass(); 
</code></pre>

<p>Or how should I instantiate <code>TMyType</code> object?</p>

<p>Below I have provided the definition of the template classes as they are in the library along with their default constructors.</p>

<p>The definition of the template classes with their default constructors are as follows: </p>

<ol>
<li><p>Vector of TVals</p>

<pre><code>template &lt;class TVal&gt; 
class TVec{
public:
   typedef TVal* TIter;
protected:
  int MxVals; 
  int Vals;
  TVal* ValT;
public:
  TVec(): MxVals(0), Vals(0), ValT(NULL){}
...
};
</code></pre></li>
<li><p>Pair of TVals</p>

<pre><code>template &lt;class TVal1, class TVal2&gt;
class TPair{
public:
  TVal1 Val1;
  TVal2 Val2;
public:
  TPair(): Val1(), Val2(){}
...
};
</code></pre></li>
<li><p>List </p>

<pre><code>template &lt;class TVal&gt;
class TLst{
public:
  typedef TLstNd&lt;TVal&gt;* PLstNd;
private:
  int Nds;
  PLstNd FirstNd;
  PLstNd LastNd;
public:
  TLst(): Nds(0), FirstNd(NULL), LastNd(NULL){}
</code></pre></li>
<li><p>Integer</p>

<pre><code>class TInt{
public:
  int Val;
public:
  TInt(): Val(0){}
  TInt(const int&amp; _Val): Val(_Val){}
...
};
</code></pre></li>
<li><p>A Node in List</p>

<pre><code>template &lt;class TVal&gt;
class TLstNd{
public:
  TLstNd* PrevNd;
  TLstNd* NextNd;
  TVal Val;
public:
  TLstNd(): PrevNd(NULL), NextNd(NULL), Val(){}
...
};
</code></pre></li>
</ol>
