Created on 2011-09-06.00:00:00 last changed 131 months ago
Proposed resolution:
This wording is relative to the FDIS.
Change the class template weak_ptr synopsis in [util.smartptr.weak] as indicated:
namespace std { template<class T> class weak_ptr { public: typedef T element_type; […] template<class U> bool owner_before(shared_ptr<U> const& b) const; template<class U> bool owner_before(weak_ptr<U> const& b) const; }; […] }
Change the prototypes in [util.smartptr.weak.obs] before p6 as indicated:
template<class U> bool owner_before(shared_ptr<U> const& b) const; template<class U> bool owner_before(weak_ptr<U> const& b) const;
[ 2012, Portland: applied to WP ]
[ 2012, Kona ]
Move to Ready.
Is there any reason why weak_ptr::owner_before member function templates are not const-qualified?
Daniel Krügler:
I don't think so. To the contrary, without these to be const member function templates, the semantics of the specializations owner_less<weak_ptr<T>> and owner_less<shared_ptr<T>> described in [util.smartptr.ownerless] is unclear.
It is amusing to note that this miss has remain undetected from the accepted paper n2637 on. For the suggested wording changes see below.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2012-11-03 04:16:46 | admin | set | messages: + msg6267 |
2012-10-25 12:46:45 | admin | set | status: voting -> wp |
2012-10-16 15:35:12 | admin | set | status: ready -> voting |
2012-02-27 16:24:02 | admin | set | messages: + msg6021 |
2012-02-12 18:36:43 | admin | set | status: new -> ready |
2011-11-24 21:48:28 | admin | set | messages: + msg5899 |
2011-09-06 00:00:00 | admin | create |