title: Move semantics when sending object as function's parameter
body: <p>I'm playing with move constructors and move assignments and i've stumbled on this problem. First code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;utility&gt;
  
  class Foo {
      public:
          Foo() {}
  
          Foo(Foo&amp;&amp; other) {
              value = std::move(other.value);
              other.value = 1; //since it's int!
          }
  
          int value;
  
      private:
          Foo(const Foo&amp; other);
  };
  
  
  void Bar(Foo&amp;&amp; x) {
      std::cout &lt;&lt; "# " &lt;&lt; x.value &lt;&lt; std::endl;
  }
  
  int main() {
      Foo foo;
      foo.value = 5;
  
      Bar(std::move(foo));
      std::cout &lt;&lt; foo.value &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p>To my mind, when i use:</p>
  
  <pre><code>Bar(std::move(foo));
  </code></pre>
  
  <p>Program should "move" foo object to temp object created using move constructor in Bar function. Doing so would leave foo object's value equal zero. Unfortunatly it seams that object held in Bar function as parameter is some sort of reference, since it doesnt "move" original value but using Bar's parameter i can change it.</p>
  
  <p>Would someone mind expalining me why i see in console:</p>
  
  <pre><code>#5
  5
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>#5
  0 //this should be done by move constructor?
  </code></pre>