title: Is it possible to do (member) function overloading based on if the caller is an rvalue or lvalue?
body: <p>I am learning C++. In the course I am doing, we have now covered the section about classes.</p>
  
  <p>I now know that functions can be overloaded; given different types of parameters, a different implementation can be made. However, in the case of member functions, the caller sort of also becomes part of the function. Is there any way we can use function overloading to pick an appropriate implementation depending on if the caller object is <em>const</em> or not? Or if it is an lvalue vs an rvalue?</p>
  
  <p>So if there is a class <code>Foo</code>, is there a way to have different implementations of <code>myFoo.bar()</code> depending on if <code>myFoo</code> is <em>const</em>, or if you pass it an rvalue such as in the case of <code>Foo{}.bar()</code>?</p>