title: Why does unique_ptr have a nullptr_t constructor?
body: <p>It isn't clear to me what the benefits are.</p>
  
  <p>If I have:</p>
  
  <pre><code>Foo* foo = nullptr;
  std::unique_ptr&lt;Foo&gt; unique_foo(foo);
  </code></pre>
  
  <p>Is the nullptr_t constructor called in that situation? Or only if you do:</p>
  
  <pre><code>std::unique_ptr&lt;Foo&gt; unique_foo(nullptr);
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>There is some discussion <a href="https://stackoverflow.com/questions/24359194/why-does-unique-ptr-overload-resetpointer-p-pointer-and-resetnullptr-t">here</a> which is to allow you to passing in nullptr_t, otherwise it won't compile since it won't cast to type pointer. So my question may be why it doesn't cast?</p>