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). 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. From-SVN: r265423
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
77990.cc | Loading commit data... | |
array_convertible_neg.cc | Loading commit data... | |
auto_ptr.cc | Loading commit data... | |
auto_ptr_neg.cc | Loading commit data... | |
constexpr.cc | Loading commit data... | |
convertible_neg.cc | Loading commit data... | |
cv_qual.cc | Loading commit data... | |
cv_qual_neg.cc | Loading commit data... | |
deduction_neg.cc | Loading commit data... | |
default.cc | Loading commit data... | |
incomplete.cc | Loading commit data... | |
lwg2905.cc | Loading commit data... | |
noexcept_move_construct.cc | Loading commit data... | |
nullptr.cc | Loading commit data... | |
pointer.cc | Loading commit data... | |
pointer_array.cc | Loading commit data... | |
pointer_array_convertible_neg.cc | Loading commit data... | |
ptr_deleter.cc | Loading commit data... | |
ptr_deleter_neg.cc | Loading commit data... |