title: moving unique_ptr in c++
body: <p>I'm designing a class that has to get ownership of a unique_ptr and do sth with it. Here is a minimized version of the code:</p>
  
  <p>Chunk.h:</p>
  
  <pre><code>class Chunk {
  public:
      Chunk(std::unique_ptr&lt;unsigned char[]&gt; contents);
      std::unique_ptr&lt;char[]&gt; contents;
  };
  </code></pre>
  
  <p>Chunk.cpp:</p>
  
  <pre><code>Chunk::Chunk(std::unique_ptr&lt;unsigned char[]&gt; content): 
               contents(std::move(content)){ }
  </code></pre>
  
  <p>but it couldn't compiled though to this error:</p>
  
  <pre><code>no matching function for call to ‘std::unique_ptr&lt;char []&gt;::unique_ptr(std::remove_reference&lt;std::unique_ptr&lt;unsigned char []&gt;&amp;&gt;::type)’
  </code></pre>