unique_ptr assignment with move-assignable but not convertible deleters
Jonathan Wakely
jwakely.gcc@gmail.com
Wed Jul 31 09:53:00 GMT 2019
On Tue, 30 Jul 2019 at 09:07, Aleksey Demakov wrote:
>
> Hi all,
>
> I found what seems to be a problem with C++ library in both gcc-8.3
> and 9.1 (while clang 7.0 is ok).
I assume by clang you mean clang with libc++, because clang with
libstdc++ fails in the same way as GCC with libstdc++.
Please report a bug as described at https://gcc.gnu.org/bugs/
The problem is that the unique_ptr::operator=(unique_ptr<U, E>&&)
assignment operator incorrectly includes this constraint from the
converting constructor:
http://eel.is/c++draft/unique.ptr.single#ctor-19.3
The assignment operator is supposed to have slightly different constraints:
http://eel.is/c++draft/unique.ptr.single#asgn-6
Thanks!
More information about the Libstdc++
mailing list