title: function template overloading
body: <p>Can anybody summarize the idea of function template overloading?  What matters, template parameter or function parameter? What about the return value?</p>
  
  <p>For example, given a function template </p>
  
  <pre><code>template&lt;typename X, typename Y&gt; void func(X x, Y y) {}
  </code></pre>
  
  <p>what's the overloaded function template?</p>
  
  <pre><code>1) template&lt;typename X&gt; void func(X x, int y) {}
  2) template&lt;typename X, typename Y&gt; X func(X x, Y y) {}
  3) template&lt;class X, class Y, class Z&gt; void func(X x, Y y, Z z) {}
  </code></pre>