PR libstdc++/91308 fix constraints on unique_ptr assignment
authorJonathan Wakely <jwakely@redhat.com>
Wed, 31 Jul 2019 14:38:26 +0000 (15:38 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 31 Jul 2019 14:38:26 +0000 (15:38 +0100)
commit949fdadb9d1ee6822672cecc06b78be362d2ddca
tree1fd650435a78fe8d0d8b0173d6b3972e65fc5053
parent208149b7201420d965991e08cb4e4c261171b0a2
PR libstdc++/91308 fix constraints on unique_ptr assignment

PR libstdc++/91308
* include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
constraints on deleter that should only apply to the constructor.
(unique_ptr<T[], D>::__safe_conversion_up): Likewise.
(unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
constraints on deleter here.
* testsuite/20_util/unique_ptr/assign/91308.cc: New test.

From-SVN: r273937
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/unique_ptr.h
libstdc++-v3/testsuite/20_util/unique_ptr/assign/91308.cc [new file with mode: 0644]