title: Using std::make_unique with custom deleter on a derived class?
body: <p>Let's say I have a class called <code>Derived</code>, which inherits from a class called <code>Base</code>. <code>Base</code> is special - though it may be created using new, it has to be destructed through a custom deleter.</p>
  
  <p>I would like to have the <code>Base</code> in an <code>unique_ptr</code> along with the custom deleter called <code>BaseDeleter</code>. This also allows me to have other classes that derive from <code>Base</code> assigned to it. And for the sake of exception-safety and consistency I'd like to use <code>std::make_unique</code> to assing my <code>unique_ptr</code>.</p>
  
  <p>I created a small snippet that demonstrates what I want:</p>
  
  <pre><code>#include &lt;memory&gt;
  
  class Base
  {
  };
  
  class Derived : public Base
  {
  };
  
  struct BaseDeleter
  {
      void operator()(Base* base)
      {
          // Perform some special deleting
      }
  };
  
  class Big
  {
  public:
      Big()
      {
          //pointer.reset(new Derived()); // This works!
          pointer = std::make_unique&lt;Derived, BaseDeleter&gt;(); // But this doesn't...
      }
  
  private:
      std::unique_ptr&lt;Base, BaseDeleter&gt; pointer;
  };
  
  int main()
  {
      Big clazz;
  }
  </code></pre>
  
  <p>Unfortunately this fails to compile on both Visual Studio 2015 Update 2 and gcc-5.1. (<a href="https://ideone.com/3DULYC" rel="nofollow">ideone</a>)<br>
  Why does this not work? How could one use <code>std::make_unique</code> to assign such a <code>std::unique_ptr</code>?</p>