title: C++ why int rvalue reference changed in this example?
body: <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int&amp;&amp; a(int&amp;&amp; b) {
      cout &lt;&lt; b &lt;&lt; endl; //output 5
      return std::move(b);
  }
  
  string&amp;&amp; d(string&amp;&amp; e) {
      cout &lt;&lt; e &lt;&lt; endl; //output abc
      return std::move(e);
  }
  int main() {
      // your code goes here
      int&amp;&amp; b = a(5);
      cout &lt;&lt; b&lt;&lt; endl; // output 0
      string&amp;&amp; f = d(&quot;abc&quot;);
      cout &lt;&lt; f &lt;&lt; endl; //output abc
      return 0;
  }
  </code></pre>
  <p>The function a should return an rvalue reference to 5.
  Why is value of b changed after the move? while the string f is unchanged?</p>