Created on 2017-02-03.00:00:00 last changed 87 months ago
Proposed resolution:
This wording is relative to N4640.
Modify [util.smartptr.shared] as indicated:
template<class U> bool owner_before(const shared_ptr<U>& b) const noexcept; template<class U> bool owner_before(const weak_ptr<U>& b) const noexcept;
Modify [util.smartptr.shared.obs] as indicated:
template<class U> bool owner_before(const shared_ptr<U>& b) const noexcept; template<class U> bool owner_before(const weak_ptr<U>& b) const noexcept;
Modify [util.smartptr.ownerless] as indicated:
template<class T> struct owner_less<shared_ptr<T>> { bool operator()(const shared_ptr<T>&, const shared_ptr<T>&) const noexcept; bool operator()(const shared_ptr<T>&, const weak_ptr<T>&) const noexcept; bool operator()(const weak_ptr<T>&, const shared_ptr<T>&) const noexcept; }; template<class T> struct owner_less<weak_ptr<T>> { bool operator()(const weak_ptr<T>&, const weak_ptr<T>&) const noexcept; bool operator()(const shared_ptr<T>&, const weak_ptr<T>&) const noexcept; bool operator()(const weak_ptr<T>&, const shared_ptr<T>&) const noexcept; }; template<> struct owner_less<void> { template<class T, class U> bool operator()(const shared_ptr<T>&, const shared_ptr<U>&) const noexcept; template<class T, class U> bool operator()(const shared_ptr<T>&, const weak_ptr<U>&) const noexcept; template<class T, class U> bool operator()(const weak_ptr<T>&, const shared_ptr<U>&) const noexcept; template<class T, class U> bool operator()(const weak_ptr<T>&, const weak_ptr<U>&) const noexcept; using is_transparent = unspecified; };
[ Kona 2017-02-27 ]
Accepted as Immediate to resolve NB comment.
[ 2017-02-20, Marshall adds wording ]
Addresses US 124
Several shared_ptr related functions have wide contracts and cannot throw, so should be marked unconditionally noexcept.
Proposed change:
Add noexcept to:
template<class U> bool shared_ptr::owner_before(shared_ptr<U> const& b) const noexcept; template<class U> bool shared_ptr::owner_before(weak_ptr<U> const& b) const noexcept; template<class U> bool weak_ptr::owner_before(shared_ptr<U> const& b) const noexcept; template<class U> bool weak_ptr::owner_before(weak_ptr<U> const& b) const noexcept; bool owner_less::operator()(A,B) const noexcept; // all versions
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2017-03-05 23:46:08 | admin | set | status: immediate -> wp |
2017-03-03 22:08:49 | admin | set | messages: + msg9055 |
2017-03-03 22:08:49 | admin | set | status: new -> immediate |
2017-02-20 20:55:10 | admin | set | messages: + msg8960 |
2017-02-20 20:55:10 | admin | set | messages: + msg8959 |
2017-02-03 00:00:00 | admin | create |