title: How does the custom deleter of std::unique_ptr work?
body: <p>According to N3290, <code>std::unique_ptr</code> accepts a deleter argument in its constructor.</p>
  
  <p>However, I can't get that to work with Visual C++ 10.0 or MinGW g++ 4.4.1 in Windows, nor with g++ 4.6.1 in Ubuntu.</p>
  
  <p>I therefore fear that my understanding of it is incomplete or wrong. I can't see the point of a deleter argument that's apparently ignored, so can anyone provide a working example?</p>
  
  <p>Preferably I'd like to see also how that works for <code>unique_ptr&lt;Base&gt; p = unique_ptr&lt;Derived&gt;( new Derived )</code>.</p>
  
  <p>Possibly with some wording from the standard to back up the example, i.e. that with whatever compiler you're using, it actually does what it's supposed to do?</p>