title: Efficiency difference between copy and move constructor
body: <p>C++11 introduced a new concept of rvalue reference. I was reading it somewhere and found following:</p>
  
  <pre><code>class Base
  {
  public:
      Base()  //Default Ctor
      Base(int t)  //Parameterized Ctor
  
      Base(const Base&amp; b)  //Copy Ctor
      Base(Base&amp;&amp; b)  //Move Ctor
  };
  
  void foo(Base b)     //Function 1
  {}
  
  void foo(Base&amp; b)   //Function 2
  {}
  
  int main()
  {
      Base b(10);
      foo(b);        -- Line 1 (i know of ambiquity but lets ignore for understanding purpose)
      foo(Base());   -- Line 2
      foo(2) ;       -- Line 3
  }
  </code></pre>
  
  <p>Now with my limited understanding, my observations are as follows :</p>
  
  <ol>
  <li><p>Line 1 will simply call the copy constructor as argument is an lvalue.</p></li>
  <li><p>Line 2 before  C++11 would have called copy constructor and all those temporary copy stuff, but with move constructor defined, that would be called here.</p></li>
  <li><p>Line 3 will again call move constructor as 2 will be implicitly converted to Base type (rvalue).</p></li>
  </ol>
  
  <p>Please correct and explain if any of above observation is wrong.</p>
  
  <p>Now, here'r my questions :</p>
  
  <ol>
  <li><p>I know once we move an object it's data will be lost at calling location. So, i above example how can i change Line 2 to move object "b" in foo (is it using std::move(b) ?).</p></li>
  <li><p>I have read move constructor is more efficient than copy constructor. How? I can think of only situation where we have memory on heap need not to be allocated again in case of move constructor. Does this statement hold true when we don't have any memory on heap?</p></li>
  <li><p>Is it even more efficient than passing by reference (no, right?)?</p></li>
  </ol>