title: Overloading templated functions
body: <p>I have a doubt about if that approach is possible, lets say you want two ways of calling a function at same time, one is returning an object and the other return by reference in parameter:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>// ...  
  template &lt;class T&gt; void func(Foo&lt;T&gt;&amp; f, const T n) 
  { 
      f.a = Something(f.a + n); 
      f.b = Something(f.b + n); 
  }
  
  template &lt;class T&gt; Foo&lt;T&gt; func(const Foo&lt;T&gt;&amp; f, const T n) 
  { 
      return Foo&lt;T&gt;( Something(f.a + n), Something(f.b + n) ); 
  }
  // ...
  
  
  // main
  Foo&lt;int&gt; foo(1, 1);
  
  func(foo, 2);
  Foo&lt;int&gt; foo2 = func(foo, 2);
  </code></pre>
  
  <p>The const word in first parameter affect the signature of method? </p>