title: C++ template full specialization syntax
body: <p>When you declare a template specialization, what's the difference between the syntax with (1) and without angular brackets (2).</p>
  
  <p>Why the version 1 fails if an implementation (definition) of the method is not provided (like in this case) with the error: <code>undefined reference to int f&lt;int&gt;(int)</code> while the version 2 works as expected?</p>
  
  <pre><code>template &lt;typename T&gt; T f(T val) {
      return val;
  }
  template&lt;&gt; int f&lt;int&gt;(int val); // 1
  template int f&lt;int&gt;(int val);   // 2
  int main() {
      cout &lt;&lt; f(555);
  }
  </code></pre>
  
  <hr>
  
  <p>I've seen <a href="https://stackoverflow.com/a/8323597/1417883">this answer</a> but it does not explicitly descrive the difference between these different syntax.</p>