title: Overloading on l-values an
body: <p>How can one invoke the second (overloaded) function?
  (This example is present in Savitch's C++ textbook.)</p>
  
  <p>(1)  <code>int&amp; f(); // will be used in any l-value invocation</code></p>
  
  <p>(2)  <code>const int&amp; f() const; // will be used in any r-value invocation</code></p>
  
  <p>I thought the first one is invoked in (a) and the second one in (b). But it is not.</p>
  
  <p>(a)   <code>f() = 123;    // the first one is invoked.</code></p>
  
  <p>(b)   <code>f() + 3;      // the first one is also invoked.</code></p>