title: Template typedef of a template
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2795023/c-template-typedef">C++ template typedef</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to derive a template type of another template by pre-specializing of another template:</p>
  
  <pre><code>template&lt;unsigned a, unsigned b, unsigned c&gt;
  struct test
  {
      enum
      {
          TEST_X = a,
          TEST_Y = b,
          TEST_Z = c,
      };
  };
  
  template&lt;unsigned c&gt;
  typedef test&lt;0, 1, c&gt; test01;
  </code></pre>
  
  <p>However, on GCC 4.4.5, I am getting this error: <code>error: template declaration of ‘typedef’</code> on the second type (<code>test01</code>).</p>
  
  <p>Guidance would be highly appreciated, as I don't understand what is wrong with my code.</p>