Implement 2801, Default-constructibility of unique_ptr.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Wed, 4 Jan 2017 13:21:02 +0000 (15:21 +0200)
committerVille Voutilainen <ville@gcc.gnu.org>
Wed, 4 Jan 2017 13:21:02 +0000 (15:21 +0200)
commit1308676957c2f1db7faef7b3b0e594e73ee652e6
tree9e9d6af6cbb8ab9fc65c7687ce8d997188d9fddb
parent2afd3180c5286a3181949a43c3e831d70a7e5404
Implement 2801, Default-constructibility of unique_ptr.

* include/bits/unique_ptr.h (__uniq_ptr_impl::_DeleterConstraint): New.
(unique_ptr::_DeleterConstraint): Likewise.
(unique_ptr()): Constrain.
(unique_ptr(pointer)): Likewise.
(unique_ptr(nullptr_t)): Likewise.
(unique_ptr<_Tp[], _Dp>::_DeleterConstraint): New.
(unique_ptr<_Tp[], _Dp>::unique_ptr()): Constrain.
(unique_ptr<_Tp[], _Dp>::unique_ptr(_Up)): Likewise.
(unique_ptr<_Tp[], _Dp>::unique_ptr(nullptr_t)): Likewise.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust.
* testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/default.cc: New.
* testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: Adjust.

From-SVN: r244054
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/unique_ptr.h
libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc
libstdc++-v3/testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc
libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc