title: C++ compiler error on template specialization
body: <p>I would like to specialize a template method for a class C that is itself
  templated by an int parameter. </p>
  
  <p>How do I do this?</p>
  
  <pre><code>template &lt;int D=1&gt;
  class C {
      static std::string  foo () { stringstream ss; ss &lt;&lt; D &lt;&lt; endl; return ss.str();}    
  };
  
  template &lt;class X&gt;
  void test() { cout &lt;&lt; "This is a test" &lt;&lt; endl;}
  
  template &lt;&gt;
  template &lt;int D&gt;
  void test&lt;C&lt;D&gt; &gt; () {cout &lt;&lt; C&lt;D&gt;::foo() &lt;&lt; endl;}
  </code></pre>
  
  <p>The specialization for test() fails with "Too many template parameter lists in declaration of void test()".</p>