title: Move semantics and std::move
body: <p>I have a general question about move semantics. Yesterday I just played around to get more comfortable with this topic. Here I added copy and move constructor operators, that simply log to the console:</p>
  <pre><code>#include &lt;iostream&gt;
  
  class Test {    
  public:
    const char* value = &quot;HI&quot;;
    Test(){
       std::cout &lt;&lt; &quot;Default Constructed\n&quot;;
    }
    Test(Test &amp;&amp;source) { 
       std::cout &lt;&lt; &quot;Move Constructed\n&quot;;
    }
    Test(const Test &amp;source) {
       std::cout &lt;&lt; &quot;Copy Constructed\n&quot;;
    }
  };    
  </code></pre>
  <p>Now when I call</p>
  <pre><code>void showMe(Test&amp;&amp; test) {
    std::cout &lt;&lt; test.value;
  }
  
  int main() {
    Test test1;
    // Test test2{test1};
    showMe(std::move(test1));
  
    return 0;
  }
  </code></pre>
  <p>The console logs out:</p>
  <p>&gt; Default Constructed</p>
  <p>&gt; HI</p>
  <p>Which is clear to me, since we are just moving the ownership to <code>showMe</code>. But why wasn't the Test's move constructor operator be called?</p>
  <p>But now, if I change <code>showMe</code> function into</p>
  <pre><code>void showMe(Test test) {
    std::cout &lt;&lt; test.value;
  }
  </code></pre>
  <p>the console shows:</p>
  <p>&gt; Default Constructed</p>
  <p>&gt; Move Constructed</p>
  <p>&gt; HI</p>
  <p>So my question is, why was the Move constructor operator not executed in the first case, but in the second?
  I usually thought in the first case, the Test's move operator should execute.
  What are the differences between those two cases mentioned?</p>