title: Doesn't get() break the idea behind std::unique_ptr?
body: <p>Example code:</p>
  
  <pre><code>#include&lt;memory&gt;
  #include&lt;iostream&gt;
  
  int main()
  {
    std::unique_ptr&lt;int&gt; intPtr{new int(3)};
  
    int* myPtr = intPtr.get();
  
    *myPtr = 4;
  
    std::cout&lt;&lt;"New result for intPtr: "&lt;&lt; *intPtr.get()&lt;&lt;std::endl;
  
  }
  </code></pre>
  
  <p>Doesn't this defeat the whole purpose behind <code>std::unique_ptr</code> ? Why is this allowed?</p>
  
  <p>Edit: I thought the whole purpose behind std::unique_ptr was to have sole ownership of an object. But this example, the object can be modified through another pointer. Doesn't this defeat std::unique_ptr's purpose?</p>