title: Can variadic template template parameter be partial-specialized?
body: <p>Consider the following program:</p>
  
  <pre><code>template&lt;template&lt;typename ...&gt; class&gt;
  struct foo {};
  
  template&lt;template&lt;typename&gt; class C&gt;
  struct foo&lt;C&gt; {};
  
  int main() {}
  </code></pre>
  
  <p>Clang rejects it with error:</p>
  
  <blockquote>
    <p>class template partial specialization does not specialize any template argument</p>
  </blockquote>
  
  <p>even in latest clang 7.0 HEAD, see demo <a href="https://wandbox.org/permlink/0A9I3yMrHz6rBo8i" rel="noreferrer">here</a>. However, <a href="https://wandbox.org/permlink/O4qh7qQWjhhS6YUZ" rel="noreferrer">gcc accepts it</a>.</p>
  
  <p>Refer to <a href="http://www.eel.is/c++draft/temp.class.spec" rel="noreferrer">[temp.class.spec]</a> where the rules of partial specialization are stated, I couldn't find anything that prohibits the partial specialization of this template. Especially, the specialization is indeed <a href="http://www.eel.is/c++draft/temp.class.order#def:more_specialized" rel="noreferrer">more specialized</a>, the error message looks incorrect.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>However, gcc's behavior is also abnormal, consider the following program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template&lt;template&lt;typename ...&gt; class&gt;
  struct foo { void show() { std::cout &lt;&lt; "Primary.\n"; } };
  
  template&lt;template&lt;typename&gt; class C&gt;
  struct foo&lt;C&gt; { void show() { std::cout &lt;&lt; "Specialized.\n"; } };
  
  template&lt;class...&gt; struct bar {};
  
  int main() {
      foo&lt;bar&gt; f;
      f.show();
  }
  </code></pre>
  
  <p>It turns out that gcc uses the specialized version in this case, see <a href="https://wandbox.org/permlink/2OjOulfvDjGJ0CPo" rel="noreferrer">here</a>.</p>
  
  <p>Now I want to ask:</p>
  
  <ul>
  <li><p>is this kind of partial specialization allowed by standard ?</p></li>
  <li><p>which compiler is correct ? ( one/all/none of them ? )</p></li>
  </ul>