r271158 - in /trunk/libstdc++-v3: ChangeLog inc...
redi@gcc.gnu.org
redi@gcc.gnu.org
Tue May 14 11:17:00 GMT 2019
Author: redi
Date: Tue May 14 11:17:11 2019
New Revision: 271158
URL: https://gcc.gnu.org/viewcvs?rev=271158&root=gcc&view=rev
Log:
LWG 2899 - Make is_move_constructible correct for unique_ptr
* include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
move assignment operator.
(__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
(__uniq_ptr_data): New class template with conditionally deleted
special members.
(unique_ptr, unique_ptr<T[], D>): Change type of data member from
__uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
constructor and move assignment operator as defaulted.
(unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
__uniq_ptr_impl::release().
(unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
to __uniq_ptr_impl::reset(pointer).
* python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
Check for new __uniq_ptr_data type.
* testsuite/20_util/unique_ptr/dr2899.cc: New test.
Added:
trunk/libstdc++-v3/testsuite/20_util/unique_ptr/dr2899.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/unique_ptr.h
trunk/libstdc++-v3/python/libstdcxx/v6/printers.py
More information about the Libstdc++-cvs
mailing list