This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TS status.
shared_ptr<array>
's constructor from unique_ptr
should be constrainedSection: 8.2.1.1 [fund.ts::memory.smartptr.shared.const] Status: TS Submitter: Jeffrey Yasskin Opened: 2014-06-16 Last modified: 2017-07-30
Priority: 0
View all issues with TS status.
Discussion:
Addresses: fund.ts
The proposed resolution for LWG 2399(i) doesn't apply cleanly to the Fundamentals TS, but the issue is still present.
[2015-02, Cologne]
Unanimous consent.
Proposed resolution:
This wording is relative to N4023 in regard to fundamental-ts changes.
In fundamental-ts, change [mods.util.smartptr.shared.const] p34 as indicated:
template <class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);-34-
-35- Effects: Equivalent toRequiresRemarks: This constructor shall not participate in overload resolution unlessY*
shall beis compatible withT*
.shared_ptr(r.release(), r.get_deleter())
whenD
is not a reference type, otherwiseshared_ptr(r.release(), ref(r.get_deleter()))
. -36- Exception safety: If an exception is thrown, the constructor has no effect.