title: Why can't unique_ptr infer the type of the deleter?
body: <p>Let's say I want to use a custom deleter with an unique_ptr:</p>
  
  <pre><code>void custom_deleter(int* obj)
  {
      delete obj; 
  }
  </code></pre>
  
  <p>Why do I have to write this:</p>
  
  <pre><code>std::unique_ptr&lt;int, void(*)(int*)&gt; x(new int, custom_deleter);
  </code></pre>
  
  <p>instead of this:</p>
  
  <pre><code>std::unique_ptr&lt;int&gt; x(new int, custom_deleter); //does not compile
  </code></pre>
  
  <p>?</p>
  
  <p>Can't the type of the deleter be inferred?</p>