r265499 - in /branches/gcc-6-branch/libstdc++-v...

redi@gcc.gnu.org redi@gcc.gnu.org
Thu Oct 25 16:41:00 GMT 2018


Author: redi
Date: Thu Oct 25 16:41:54 2018
New Revision: 265499

URL: https://gcc.gnu.org/viewcvs?rev=265499&root=gcc&view=rev
Log:
PR libstdc++/87704 fix unique_ptr(nullptr_t) constructors

Using a delegating constructor to implement these constructors means
that they instantiate the destructor, which requires the element_type to
be complete. In C++11 and C++14 they were specified to be delegating,
but that was changed as part of LWG 2801 so in C++17 they don't require
a complete type (as was intended all along).

Backport from mainline
2018-10-23  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/87704
	* include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do
	not delegate to default constructor.
	(unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise.
	* testsuite/20_util/unique_ptr/cons/incomplete.cc: New test.

Added:
    branches/gcc-6-branch/libstdc++-v3/testsuite/20_util/unique_ptr/cons/incomplete.cc
Modified:
    branches/gcc-6-branch/libstdc++-v3/ChangeLog
    branches/gcc-6-branch/libstdc++-v3/include/bits/unique_ptr.h
    branches/gcc-6-branch/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc
    branches/gcc-6-branch/libstdc++-v3/testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc



More information about the Libstdc++-cvs mailing list