title: The C++11 way of initializing data members from arguments
body: <p>Seeing as C++11 supports move semantics, when initializing data members from arguments, should we attempt to move the value instead of copying it?</p>
  
  <p>Here's an example showing how I would approach this in pre-C++11:</p>
  
  <pre><code>struct foo {
      std::vector&lt;int&gt; data;
  
      explicit foo(const std::vector&lt;int&gt;&amp; data)
          : data(data)
      {
      }
  };
  </code></pre>
  
  <p>Here, the copy constructor would be called.</p>
  
  <p>In C++11, should we get into the habit of writing like this:</p>
  
  <pre><code>struct foo {
      std::vector&lt;int&gt; data;
  
      explicit foo(std::vector&lt;int&gt; data)
          : data(std::move(data))
      {
      }
  };
  </code></pre>
  
  <p>Here, the move constructor would be called... as well as the copy constructor if the argument passed is an lvalue, but the benefit is that if an rvalue was passed, the move constructor would be called instead of the copy one.</p>
  
  <p>I'm wondering if there's something I'm missing.</p>