title: Take ownership of parameter by rvalue-reference
body: <p>I want to make clear that the constructor of my class <code>A</code> will take ownership of the passed <code>Data</code> parameter. The obvious thing to do is take a <code>unique_ptr</code> by value:</p>
  
  <pre><code>class A
  {
  public:
      A(std::unique_ptr&lt;Data&gt; data) : _data(std::move(data)) { }
  
      std::unique_ptr&lt;Data&gt; _data;
  };
  </code></pre>
  
  <p>However, for my use-case, there is no reason why <code>Data</code> should be a pointer, since a value type would suffice. The only remaining option that I could think of to make really clear that <code>Data</code> will be owned by <code>A</code> is pass by rvalue-reference:</p>
  
  <pre><code>class A
  {
  public:
      A(Data&amp;&amp; data) : _data(std::move(data)) { }
  
      Data _data;
  };
  </code></pre>
  
  <p>Is this a valid way to signal ownership or are there better options to do this without using <code>unique_ptr</code>?</p>