Section: 99 [depr.util.smartptr.shared.atomic], 99 [atomics.types.operations.req] Status: Resolved Submitter: JF Bastien Opened: 2014-10-08 Last modified: 2017-11-29
Priority: Not Prioritized
View all other issues in [depr.util.smartptr.shared.atomic].
View all issues with Resolved status.
Discussion:
The definitions of compare and exchange in [util.smartptr.shared.atomic] p32 and 99 [atomics.types.operations.req] p20 state:
Requires: The failure argument shall not be
memory_order_release
normemory_order_acq_rel
. Thefailure
argument shall be no stronger than thesuccess
argument.
The term "stronger" isn't defined by the standard.
It is hinted at by 99 [atomics.types.operations.req] p21:When only one
memory_order
argument is supplied, the value ofsuccess
isorder
, and the value offailure
isorder
except that a value ofmemory_order_acq_rel
shall be replaced by the valuememory_order_acquire
and a value ofmemory_order_release
shall be replaced by the valuememory_order_relaxed
.
Should the standard define a partial ordering for memory orders, where consume and acquire are incomparable with release?
[2014-11 Urbana]
Move to SG1.
[2016-11-12, Issaquah]
Resolved by P0418R2
Proposed resolution: