Date
2011-09-06.00:00:00
Message id
5898

Content

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.