title: Why dependent template name accepted without keyword?
body: <p>I've written a template <code>entry_func</code>, which uses a template method <code>func</code> of a template class. In <code>entry_func</code>, to call <code>func</code>, I should use the keyword <code>template</code>. In the example, the line (1) doesn't compile and the line (2) does. So far ok.</p>
  
  <p>However, if I change the line (1) a little and get the line (3), the line (3) compiles too, without the keyword <code>template</code>. Why? In my understanding, the change should not affect the need of the keyword.</p>
  
  <pre><code>#include &lt;type_traits&gt;
  
  template&lt;class&gt;
  struct Impl {
    template&lt;class T&gt;
    static T func(T t) {
      static_assert(sizeof(T)&gt;=0, "Shouldn't be instantiated.");
    }
  };
  
  template&lt;&gt;
  struct Impl&lt;std::is_pointer&lt;int*&gt;&gt; {
    template&lt;class T&gt;
    static T func(T u) {
      return u;
    }
  };
  
  template&lt;class T&gt;
  inline T entry_func(T u) {
  //return Impl&lt;std::is_pointer&lt;T  &gt;&gt;::func&lt;T&gt;(u);          // (1) fail
  //return Impl&lt;std::is_pointer&lt;T  &gt;&gt;::template func&lt;T&gt;(u); // (2) ok
    return Impl&lt;std::is_pointer&lt;int&gt;&gt;::func&lt;T&gt;(u);          // (3) ok???
  }
  
  int main() {}
  </code></pre>
  
  <p>g++ version 5.3.1, clang version 3.8.0.</p>