Section: D.16 [depr.util.smartptr.shared.atomic], 99 [atomics.types.operations.req] Status: Resolved Submitter: JF Bastien Opened: 2014-10-08 Last modified: 2017-12-02
Priority: Not Prioritized
View all other issues in [depr.util.smartptr.shared.atomic].
View all issues with Resolved status.
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 nor memory_order_acq_rel. The failure argument shall be no stronger than the success 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 of success is order, and the value of failure is order except that a value of memory_order_acq_rel shall be replaced by the value memory_order_acquire and a value of memory_order_release shall be replaced by the value memory_order_relaxed.
Should the standard define a partial ordering for memory orders, where consume and acquire are incomparable with release?
Move to SG1.
Resolved by P0418R2