title: unique_ptr with deleter
body: <p>I am trying to use <code>std::unique_ptr</code> with deleter. This is my code:</p>
  
  <pre><code>template&lt;class T&gt;
  struct Deleter
  {
      void operator()(T* p) 
      {
          delete[] p;
      }
  };
  
  void Test()
  {
      vector&lt;unique_ptr&lt;char&gt;&gt; v;
  
      for(size_t i = 0; i &lt; 5; ++i)
      {
          char* p = new char[10];
          sprintf(p, "string %d", i);
          v.push_back( unique_ptr&lt;char, Deleter&lt;char&gt;&gt;(p) );  // error is here
      }
  }
  </code></pre>
  
  <blockquote>
    <p>error C2664: 'void std::vector&lt;_Ty>::push_back(std::unique_ptr &amp;&amp;)' : cannot convert parameter 1 from 'std::unique_ptr&lt;_Ty,_Dx>' to 'std::unique_ptr&lt;_Ty> &amp;&amp;'</p>
  </blockquote>
  
  <p>Compiler: VC++ 2012. How can I fix this? My goal is to use <code>unique_ptr</code> with custom deleter which calls <code>delete[]</code> instead of default <code>delete</code>.</p>