title: C++ template specialization of function: "illegal use of explicit template arguments"
body: <p>The following template specialization code:</p>
  
  <pre><code>template&lt;typename T1, typename T2&gt;
  void spec1()
  {
  
  }
  </code></pre>
  
  <p>Test case 1:</p>
  
  <pre><code>template&lt; typename T1&gt; //compile error
  void spec1&lt;int&gt;()
  {
  
  }
  </code></pre>
  
  <p>Test case 2:</p>
  
  <pre><code>template&lt; typename T2&gt; //compile error
  void spec1&lt;int&gt;()
  {
  
  }
  </code></pre>
  
  <p>generates the following compilation error:</p>
  
  <blockquote>
    <p>error C2768: 'spec1' : illegal use of explicit template arguments </p>
  </blockquote>
  
  <p>Does anyone know why?</p>