title: Template template argument deduction fails with Clang and MSVC, but succeeds with GCC
body: <p>Consider the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;algorithm&gt;
  
  template &lt;typename T, template &lt;typename&gt; typename U&gt;
  T get_max(U&lt;T&gt;&amp; gr) {
      return *std::max_element(gr.begin(), gr.end());
  }
  
  int main() {
      std::vector&lt;int&gt; c = {1, 2, 3};
      get_max(c);
  }
  </code></pre>
  
  <p>While GCC <a href="https://godbolt.org/z/4KibPN" rel="nofollow noreferrer">accepts</a> the above code, Clang and MSVC <a href="https://godbolt.org/z/D_GGoq" rel="nofollow noreferrer">reject</a> it saying that argument (<code>std::vector</code>) has a different type (<code>std::vector</code> has two <code>template</code> parameters, but I introduced only one):</p>
  
  <blockquote>
  <pre><code>&lt;source&gt;:14:5: error: no matching function for call to 'get_max'
  get_max(c);
  ^~~~~~~
  &lt;source&gt;:7:3: note: candidate template ignored: substitution failure [with T = int]: template template argument has different template parameters than its corresponding template template parameter
  T get_max(U&lt;T&gt;&amp; gr) { 
    ^
  1 error generated.
  Compiler returned: 1
  </code></pre>
  </blockquote>
  
  <p>Which compiler(s) is/are correct?</p>
  
  <p>To my understanding, GCC is correct since the second <code>template</code> type is deducible (due to it being defaulted), but that might not be legal code due to actual signature mismatch. </p>