Created on 2009-10-10.00:00:00 last changed 162 months ago
Proposed resolution:
Change [util.smartptr.weak]/2 as described, the intention is to fix the now no longer valid requirement that weak_ptr is LessComparable [Note the deleted comma]:
Specializations of weak_ptr shall be CopyConstructible
,and CopyAssignable,and LessThanComparable,allowing their use in standard containers.
In [util.smartptr.weak.obs] remove the paragraphs 9-11 including prototype:
template<class T, class U> bool operator<(const weak_ptr<T>& a, const weak_ptr<U>& b);Returns: an unspecified value such that
operator< is a strict weak ordering as described in 25.4;under the equivalence relation defined by operator<, !(a < b) && !(b < a), two weak_ptr instances are equivalent if and only if they share ownership or are both empty.
Throws: nothing.
[Note: Allows weak_ptr objects to be used as keys in associative containers. — end note]
[ 2009-11-06 Howard adds: ]
Moved to Tentatively Ready after 5 positive votes on c++std-lib.
The n2637 paper suggested several updates of the ordering semantics of shared_ptr and weak_ptr, among those the explicit comparison operators of weak_ptr were removed/deleted, instead a corresponding functor owner_less was added. The problem is that n2637 did not clearly enough specify, how the previous wording parts describing the comparison semantics of weak_ptr should be removed.
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg1249 |
2010-10-21 18:28:33 | admin | set | messages: + msg1248 |
2009-10-10 00:00:00 | admin | create |