title: Why doesn't std::unique_ptr implicitly convert to T* and const T*?
body: <p>If I were to write it myself, I guess I'd do something like:</p>
  
  <pre><code>template&lt;typename T, typename Dtor = std::default_delete&lt;T&gt; &gt;
  class Uptr : private Dtor {
    T* vl_;
  public:
    explicit Uptr(T* vl = nullptr) noexcept : vl_(vl) {}
    ~Uptr() noexcept { Dtor::operator()(vl_); }
  
    Uptr&amp; swap(Uptr&amp; o) noexcept { T* tmp; tmp = vl_; vl_=o.vl_; o.vl_ = tmp; }
  
    Uptr&amp; operator=(Uptr&amp;&amp; o) noexcept { o.swap(*this); }
    Uptr&amp; operator=(nullptr_t) noexcept { vl_=nullptr; return *this; } 
    Uptr(Uptr&amp;&amp; o) noexcept : Uptr(nullptr) { *this = std::move(o); } 
  
    Uptr(const Uptr&amp; o) = delete;
    Uptr&amp; operator=(const Uptr&amp; o) = delete;
  
  
    operator T*() noexcept { return vl_; } 
    operator const T*() const noexcept { return vl_; } 
  
    T* release() noexcept { T* ret = vl_; vl_=nullptr; return ret; }    
  
    const Dtor&amp; deleter() const noexcept { return *(static_cast&lt;Dtor*&gt;(this)); }
    Dtor&amp; deleter() noexcept { return *(static_cast&lt;Dtor*&gt;(this)); }
  };
  </code></pre>
  
  <p>And save myself from having to define <code>get()</code> and operators <code>*</code>, <code>-&gt;</code>, and <code>[]</code>.</p>
  
  <p>What's wrong with having implicit conversions in this case?</p>