[atomic] Constraints on failure_order?
According to [1]: "The compare_exchange_weak/compare_exchange_strong variants taking four parameters differ from the three parameter variants in that they allow a different memory ordering constraint to be specified in case the operation fails." According to std::atomic there are some constaints on failure_order. Is this also the case for boost::atomic? [1] http://www.boost.org/doc/html/atomic/interface.html
On Monday 05 May 2014 20:55:08 Bjorn Reese wrote:
According to [1]:
"The compare_exchange_weak/compare_exchange_strong variants taking four parameters differ from the three parameter variants in that they allow a different memory ordering constraint to be specified in case the operation fails."
According to std::atomic there are some constaints on failure_order. Is this also the case for boost::atomic?
Yes, as boost::atomic aims to implement the standard interface as close as possible. The requirements are not enforced with asserts yet, but they will be.
participants (2)
-
Andrey Semashev
-
Bjorn Reese