return by reference - which of the two is the correct one
<p>i have the function: const A&amp; f(...) {...}</p>

<pre><code>a. const A a1 = f(..);
b. const A &amp;a2 = f(...);
</code></pre>

<p>which of the is the better one to use? in both cases, if i understand correctly, i prevent the possibility of modifying the returned object. 
in the first option, the copy constructor of A will be called - am i correct?</p>
