This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
2876.shared_ptr::shared_ptr(const weak_ptr<Y>&)
constructor should be constrained
Section: 20.3.2.2.2 [util.smartptr.shared.const] Status: C++17 Submitter: United States Opened: 2017-02-03 Last modified: 2020-09-06
Priority: Not Prioritized
View other active issues in [util.smartptr.shared.const].
View all other issues in [util.smartptr.shared.const].
View all issues with C++17 status.
Discussion:
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.
[2017-02-23, Jonathan provides wording]
[Kona 2017-02-27]
Accepted as Immediate to resolve NB comment.
Proposed resolution:
This wording is relative to N4640.
Modify 20.3.2.2.2 [util.smartptr.shared.const] as indicated:
template<class Y> explicit shared_ptr(const weak_ptr<Y>& r);-22- Requires:
[…] -25- Throws: […] -?- Remarks: This constructor shall not participate in overload resolution unlessY*
shall be compatible withT*
.Y*
is compatible withT*
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4