title: What happens when a copy of a shared pointer is created whose object contains a unique pointer?
body: <p>I have been messing about with SFML, figuring out how a simple 2D game could be built. I just noticed this behaviour and couldn't figure out what's going on. Sample code for what is confusing me:</p>
  
  <pre><code>struct Unique {};
  
  class Shared {
  public:
      Shared() {
          p = make_unique&lt;Unique&gt;();
      }
      unique_ptr&lt;Unique&gt; p;
  };
  
  void SharedCopyTest() {
      Shared foo;
      //Shared copy = foo;    // Error: function "Shared::Shared(const Shared &amp;)" 
                              // (declared implicitly) cannot be referenced 
                              // -- it is a deleted function
  
      shared_ptr&lt;Shared&gt; sharedPtr = make_shared&lt;Shared&gt;();
      shared_ptr&lt;Shared&gt; ptrCopy = sharedPtr; // No error
  }
  </code></pre>
  
  <p>At this point, <code>&amp;sharedPtr-&gt;p == &amp;ptrCopy-&gt;p</code>; but how is it possible,  if <code>p</code> is of type <code>unique_ptr&lt;T&gt;</code>?</p>