title: Returning unique_ptr which is function parameter
body: <p>I have the following method:</p>
  
  <pre><code>std::unique_ptr&lt;Req&gt; RequestConverter::SetReg(
      const std::unique_ptr&lt;Req&gt; pb_req, ...) {
  </code></pre>
  
  <p>I want to return parameter pb_req from the above method.
  I get this error (with or without std::move):</p>
  
  <pre><code>error: call to deleted constructor of 'std::unique_ptr&lt;Req&gt;'
  </code></pre>
  
  <p>What's recommended approach ?</p>
  
  <p>Thanks</p>