Created on 2017-02-03.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N4640.
Modify [util.smartptr.shared.const] as indicated:
[Drafting note: This also adds a hyphen to "well defined"]
template<class Y> explicit shared_ptr(Y* p);-4- Requires: Y shall be a complete type. The expression delete[] p, when T is an array type, or delete p, when T is not an array type,
-5- Effects: […] -6- Postconditions: […] -7- Throws: […] -?- Remarks: When T is an array type, this constructor shall not participate in overload resolution unless the expression delete[] p is well-formed and either T is U[N] and Y(*)[N] is convertible to T*, or T is U[] and Y(*)[] is convertible to T*. When T is not an array type, this constructor shall not participate in overload resolution unless the expression delete p is well-formed and Y* is convertible to T*.shall be well formed,shall have well-defined behavior, and shall not throw exceptions.When T is U[N], Y(*)[N] shall be convertible to T*; when T is U[], Y(*)[] shall be convertible to T*; otherwise, Y* shall be convertible to T*.
[ Kona 2017-02-27 ]
Accepted as Immediate to resolve NB comment.
[ Kona 2017-02-27: Jonathan updates wording after LWG review ]
[ 2017-02-23, Jonathan provides wording ]
Previous resolution [SUPERSEDED]:
This wording is relative to N4640.
Modify [util.smartptr.shared.const] as indicated:
[Drafting note: This also adds a hyphen to "well defined"]
template<class Y> explicit shared_ptr(Y* p);-4- Requires: Y shall be a complete type. The expression delete[] p, when T is an array type, or delete p, when T is not an array type,
-5- Effects: […] -6- Postconditions: […] -7- Throws: […] -?- Remarks: When T is an array type, this constructor shall not participate in overload resolution unless the expression delete[] p is well-formed and either T is U[N] and Y(*)[N] is convertible to T*, or Y(*)[] is convertible to T*. When T is not an array type, this constructor shall not participate in overload resolution unless the expression delete p is well-formed and Y* is convertible to T*.shall be well formed,shall have well-defined behavior, and shall not throw exceptions.When T is U[N], Y(*)[N] shall be convertible to T*; when T is U[], Y(*)[] shall be convertible to T*; otherwise, Y* shall be convertible to T*.
Addresses US 125
Paragraph 4: This constructor should not participate in overload resolution unless the Requires clause is satisfied. Note that this would therefore apply to some assignment operator and reset overloads, via Effects: equivalent to some code wording.
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:43 | admin | set | status: wp -> c++17 |
2017-03-05 23:46:08 | admin | set | status: immediate -> wp |
2017-03-03 22:08:49 | admin | set | messages: + msg9056 |
2017-03-03 22:08:49 | admin | set | status: new -> immediate |
2017-02-28 03:05:42 | admin | set | messages: + msg9009 |
2017-02-23 21:02:16 | admin | set | messages: + msg8990 |
2017-02-23 21:02:16 | admin | set | messages: + msg8989 |
2017-02-03 00:00:00 | admin | create |