title: Smart pointer declared const
body: <p>Smart pointers declared <code>const</code> could only invoke the member functions marked with <code>const</code>. So their usage is very limited.</p>
  <p>1.For unique pointers, you could not <a href="https://en.cppreference.com/w/cpp/memory/unique_ptr" rel="nofollow noreferrer">change the transfer the ownership of the managed object to another <code>unique_ptr</code></a> and not even return it from a specific function.</p>
  <p>So my question is that when <code>const unique_ptr&lt;T&gt;</code> should be used? Some simple example may help me to understand it better.</p>
  <p>2.For shared pointers, I think it's meaningless to use <code>const shared_ptr&lt;T&gt;</code> because you can never increase the counter of a specific const shared pointer.
  If I wrong, please let me know.</p>