Title
shared_ptr::shared_ptr(const weak_ptr<Y>&) constructor should be constrained
Status
c++17
Section
[util.smartptr.shared.const]
Submitter
United States

Created on 2017-02-03.00:00:00 last changed 81 months ago

Messages

Date: 2017-03-03.22:08:49

Proposed resolution:

This wording is relative to N4640.

  1. Modify [util.smartptr.shared.const] as indicated:

    template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);
    

    -22- Requires: Y* shall be compatible with T*.

    […]

    -25- Throws: […]

    -?- Remarks: This constructor shall not participate in overload resolution unless Y* is compatible with T*.

Date: 2017-03-03.22:08:49

[ Kona 2017-02-27 ]

Accepted as Immediate to resolve NB comment.

Date: 2017-02-15.00:00:00

[ 2017-02-23, Jonathan provides wording ]

Date: 2017-02-03.00:00:00

Addresses US 129

Paragraph 22: This constructor should not participate in overload resolution unless the requirements are satisfied, in order to give correct results from the is_constructible trait.

Proposed change:

Add a Remarks: clause to constrain this constructor not to participate in overload resolution unless the Requires clause is satisfied.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2017-03-05 23:46:08adminsetstatus: immediate -> wp
2017-03-03 22:08:49adminsetmessages: + msg9058
2017-03-03 22:08:49adminsetstatus: new -> immediate
2017-02-23 21:54:27adminsetmessages: + msg8994
2017-02-23 21:54:27adminsetmessages: + msg8993
2017-02-03 00:00:00admincreate