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.

2410. [fund.ts] shared_ptr<array>'s constructor from unique_ptr should be constrained

Section: 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 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.

  1. 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- RequiresRemarks: This constructor shall not participate in overload resolution unless Y* shall beis compatible with T*.

    -35- Effects: Equivalent to shared_ptr(r.release(), r.get_deleter()) when D is not a reference type, otherwise shared_ptr(r.release(), ref(r.get_deleter())).

    -36- Exception safety: If an exception is thrown, the constructor has no effect.