title: Why does unique_ptr have the deleter as a type parameter while shared_ptr doesn't?
body: <p>The <a href="http://en.cppreference.com/w/cpp/memory/unique_ptr" rel="noreferrer"><code>std::unique_ptr</code></a> template has two parameters: the type of the pointee, and the type of the deleter. This second parameter has a default value, so you usually just write something like <code>std::unique_ptr&lt;int&gt;</code>.</p>
  
  <p>The <a href="http://en.cppreference.com/w/cpp/memory/shared_ptr" rel="noreferrer"><code>std::shared_ptr</code></a> template has only one parameter though: the type of the pointee. But you can use a custom deleter with this one too, even though the deleter type is not in the class template. The usual implementation uses type erasure techniques to do this.</p>
  
  <p>Is there a reason the same idea was not used for <code>std::unique_ptr</code>?</p>