title: Move constructor involving const unique_ptr
body: <p>In the code below, I made p const because it will never point to any other int during Foo's lifetime.  This doesn't compile, as the unique_ptr's copy constructor is called, which is obviously deleted.  Are there any solutions besides making p non-const?  Thanks.</p>
  
  <pre><code>#include &lt;memory&gt;
  
  using namespace std;
  
  class Foo 
  {
  public:
    //x is a large struct in reality
    Foo(const int* const x) : p(x) {};
    Foo(Foo&amp;&amp; foo) : p(std::move(foo.p)) {};
  private:
    const unique_ptr&lt;int&gt; p;
  };
  </code></pre>