Created on 2012-07-28.00:00:00 last changed 130 months ago
Proposed resolution:
This wording is relative to N3376.
Change [util.smartptr.shared.atomic] as indicated:
template<class T> bool atomic_compare_exchange_weak( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);-27- Requires: p shall not be null and v shall not be null.
[…]template<class T> bool atomic_compare_exchange_weak_explicit( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w, memory_order success, memory_order failure); template<class T> bool atomic_compare_exchange_strong_explicit( shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w, memory_order success, memory_order failure);-31- Requires: p shall not be null and v shall not be null.
[…]
[ 2013-04-20 Bristol ]
[ 2012-10 Portland: Move to Ready ]
This is clearly the right thing to do, and Lawrence concurs.
Looking at [util.smartptr.shared.atomic]/p31
template<class T> bool atomic_compare_exchange_strong_explicit(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w, memory_order success, memory_order failure);-31- Requires: p shall not be null.
What about v? Can it be null? And if so, what happens?
This looks closely related to C++11 issue LWG 1030, where we gave every signature in this section a:Requires: p shall not be null.
It looks like a simple oversight to me that we did not add for the atomic_compare_exchange_*:
Requires: p shall not be null and v shall not be null.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2013-04-25 19:07:07 | admin | set | status: voting -> wp |
2013-04-19 22:22:17 | admin | set | messages: + msg6477 |
2013-04-19 22:22:17 | admin | set | status: ready -> voting |
2012-10-19 07:50:57 | admin | set | messages: + msg6189 |
2012-10-19 07:50:57 | admin | set | status: new -> ready |
2012-08-11 20:23:11 | admin | set | messages: + msg6113 |
2012-07-28 00:00:00 | admin | create |