Created on 2014-06-21.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N3936.
Change [util.smartptr.shared] p2 as indicated:
-2- Specializations of shared_ptr shall be CopyConstructible, CopyAssignable, and LessThanComparable, allowing their use in standard containers. Specializations of shared_ptr shall be contextually convertible to bool, allowing their use in boolean expressions and declarations in conditions. The template parameter T of shared_ptr may be an incomplete type.
[ Urbana 2014-11-07: Move to Ready ]
N3920 made this edit, which is correct but unrelated to the support for arrays:
Change 20.7.2.2 [util.smartptr.shared] p2 as follows:
Specializations of shared_ptr shall be CopyConstructible, CopyAssignable, and LessThanComparable, allowing their use in standard containers. Specializations of shared_ptr shall be contextually convertible to bool, allowing their use in boolean expressions and declarations in conditions. […]
That change is actually fixing a defect in the current wording and should be applied directly to the working paper, not just to the Library Fundamentals TS. The declarations of the conversion operator in [util.smartptr.shared] and [util.smartptr.shared.obs] are explicit which contradicts the "convertible to bool" statement. The intention is definitely for shared_ptr to only be contextually convertible to bool.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2015-05-22 18:31:21 | admin | set | status: ready -> wp |
2014-11-08 16:43:57 | admin | set | messages: + msg7175 |
2014-11-08 16:43:57 | admin | set | status: new -> ready |
2014-06-29 11:48:08 | admin | set | messages: + msg7083 |
2014-06-21 00:00:00 | admin | create |