https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116529

Jiang An <de34 at live dot cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |de34 at live dot cn

--- Comment #6 from Jiang An <de34 at live dot cn> ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Halalaluyafail3 from comment #0)
> > haven't seen any restrictions on using a unique_ptr with a reference type so
> > I assume that this is OK (since C++17).
> 
> I'm not sure if that's actually intended, it's probably just an accident
> that it works.

In C++14/N4140 [unique.ptr.single.ctor]
(https://timsong-cpp.github.io/cppwp/n4140/unique.ptr.single.ctor#24), the
removed wording was

> Remarks: This constructor shall not participate in overload resolution unless
> U* is implicitly convertible to T* and D is the same type as 
> default_delete<T>.


https://cplusplus.github.io/LWG/issue4032 may be related. Per the comments you
made, perhaps there should be substitution failure when T* is ill-formed?

Reply via email to