PR77990 refactor unique_ptr to encapsulate tuple
authorJonathan Wakely <jwakely@redhat.com>
Wed, 19 Oct 2016 09:34:57 +0000 (10:34 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 19 Oct 2016 09:34:57 +0000 (10:34 +0100)
commite182393e31609b0d1474cea18c69bbb6c287ae6b
tree5bd7a9125561990d1679f5f2e5d2216001012d16
parente7a3e0c653be4bd32f116dae06438896b7dc915b
PR77990 refactor unique_ptr to encapsulate tuple

PR libstdc++/77990
* include/bits/unique_ptr.h (__uniq_ptr_impl): New type to
encapsulate implementation details.
(unique_ptr::unique_ptr(_Up)): Don't copy deleter object.
(unique_ptr::get, unique_ptr::get_deleter, unique_ptr::release):
Call member functions of implementation object.
(unique_ptr<T[], D>): Likewise.
* python/libstdcxx/v6/printers.py (UniquePointerPrinter): Adjust for
new implementation.
* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker): Likewise.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust dg-error
lines.
* testsuite/20_util/unique_ptr/assign/cv_qual.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/cv_qual.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/77990.cc: New test.

From-SVN: r241330
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/unique_ptr.h
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/python/libstdcxx/v6/xmethods.py
libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc
libstdc++-v3/testsuite/20_util/unique_ptr/cons/77990.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/unique_ptr/cons/cv_qual.cc