Title
atomic_flag::clear should not accept memory_order_consume
Status
c++14
Section
[atomics.flag]
Submitter
Ben Viglietta

Created on 2012-03-08.00:00:00 last changed 130 months ago

Messages

Date: 2013-04-18.22:58:13

[ This wording is relative to N3376. ]

void atomic_flag_clear(volatile atomic_flag *object) noexcept;
void atomic_flag_clear(atomic_flag *object) noexcept;
void atomic_flag_clear_explicit(volatile atomic_flag *object, memory_order order) noexcept;
void atomic_flag_clear_explicit(atomic_flag *object, memory_order order) noexcept;
void atomic_flag::clear(memory_order order = memory_order_seq_cst) volatile noexcept;
void atomic_flag::clear(memory_order order = memory_order_seq_cst) noexcept;

-7- Requires: The order argument shall not be memory_order_consume, memory_order_acquire, or memory_order_acq_rel.

-8- Effects: Atomically sets the value pointed to by object or by this to false. Memory is affected according to the value of order.

Date: 2013-04-15.00:00:00

[ 2013-04-20, Bristol ]

Accepted for the working paper

Date: 2012-11-02.22:48:46

[ 2012, Portland: move to Review ]

Hans: this is a clear oversight.

Moved to review

Date: 2012-03-08.00:00:00

N3376 [atomics.flag]/7 says this about atomic_flag::clear:

Requires: The order argument shall not be memory_order_acquire or memory_order_acq_rel.

In addition, memory_order_consume should be disallowed, since it doesn't meaningfully apply to store operations. It's already disallowed on the analogous atomic<T>::store. The proposed updated text would be:

Requires: The order argument shall not be memory_order_consume, memory_order_acquire, or memory_order_acq_rel.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-04-25 19:07:07adminsetstatus: voting -> wp
2013-04-20 08:17:49adminsetstatus: review -> voting
2013-04-18 22:58:13adminsetmessages: + msg6452
2012-11-02 22:48:46adminsetmessages: + msg6249
2012-11-02 22:48:46adminsetstatus: new -> review
2012-03-12 20:49:57adminsetmessages: + msg6057
2012-03-08 00:00:00admincreate