title: Correct way to return an rvalue reference to this
body: <p>The code below results in <strong>Undefined Behaviour</strong>. Be sure to read ALL the answers for completeness.</p>
  
  <hr>
  
  <p>When chaining an object via the <code>operator&lt;&lt;</code> I want to preserve the lvalue-ness / rvalue-ness of the object:</p>
  
  <pre><code>class Avenger {
    public:
      Avenger&amp; operator&lt;&lt;(int) &amp; {
        return *this;
      }
      Avenger&amp;&amp; operator&lt;&lt;(int) &amp;&amp; {
        return *this; // compiler error cannot bind lvalue to rvalue
        return std::move(*this);
      }
  };
  void doJustice(const Avenger &amp;) {};
  void doJustice(Avenger &amp;&amp;) {};
  
  int main() {
    Avenger a;
    doJustice(a &lt;&lt; 24); // parameter should be Avenger&amp;
    doJustice(Avenger{} &lt;&lt; 24); // parameter should be Avenger&amp;&amp;
  
    return 0;
  }
  </code></pre>
  
  <p>I cannot simply return <code>*this</code> which implies that the type of <code>*this</code> of an <code>rvalue</code> object is still an <code>lvalue reference</code>. I would have expected to be an <code>rvalue reference</code>.</p>
  
  <ul>
  <li>Is it correct / recommended to return <code>std::move(*this)</code> on an member overloaded for the <code>&amp;&amp;</code> qualifier, or should other method be used? I know that <code>std::move</code> is just a cast, so I think it’s ok, I just want to double check.</li>
  <li>What is the reason/explanation that <code>*this</code> of an <code>rvalue</code> is an <code>lvalue reference</code> and not an <code>rvalue reference</code>?</li>
  <li>I remember seeing in C++14 something about move semantics of <code>*this</code>. Is that related to this? Will any of the above change in C++14?</li>
  </ul>