title: Calling template member function of template class fails on GCC/clang but works with MSVC
body: <p>I am trying to wrap a call to a template member function of a template class with a free function, and I do not understand why the snippet of code below compiles with MSVC but is rejected by gcc and clang.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>template &lt;int N&gt;
  struct S {
      template &lt;int I&gt;
      void f();
  };
  
  template &lt;int N, int I&gt;
  void call(S&lt;N&gt;&amp; s) {
      s.f&lt;I&gt;();               // g++-9.1 and clang++-8.0 complain here
  }
  
  template void call&lt;4, 1&gt;(S&lt;4&gt;&amp;); // The exact numbers are unimportant
  </code></pre>
  
  <p>This code fails to compile with g++, with the error message <code>error: invalid operands of types '&lt;unresolved overloaded function type&gt;' and 'int' to binary 'operator&lt;'</code>.
  Clang similarly refuses to compile this, complaining <code>error: missing 'template' keyword prior to dependent template name 'f'</code>.</p>
  
  <p>MSVC happily compiles the full example with no errors or warnings.</p>
  
  <p>Is this code valid C++ or are gcc and clang correct to reject it?</p>