Commit 79535de
committed
Fix compare_exchange_* with only one memory_order
Previously, compare_exchange_weak and compare_exchange_strong with only one
memory_order were defined as being equivalent to passing that value as both
the success and failure arguments of the overload accepting two memory_orders.
This is a bug, because the overload accepting two memory_orders clearly states
that failure does not accept certain values of memory_order.
The definitions of the equivalent functions in ISO C++ do not have this issue,
and so this commit aligns the behavior of these functions with ISO C++.1 parent 088b965 commit 79535de
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20587 | 20587 | | |
20588 | 20588 | | |
20589 | 20589 | | |
20590 | | - | |
| 20590 | + | |
| 20591 | + | |
| 20592 | + | |
| 20593 | + | |
| 20594 | + | |
| 20595 | + | |
| 20596 | + | |
| 20597 | + | |
| 20598 | + | |
| 20599 | + | |
| 20600 | + | |
| 20601 | + | |
| 20602 | + | |
| 20603 | + | |
20591 | 20604 | | |
20592 | 20605 | | |
20593 | 20606 | | |
| |||
20617 | 20630 | | |
20618 | 20631 | | |
20619 | 20632 | | |
20620 | | - | |
| 20633 | + | |
| 20634 | + | |
| 20635 | + | |
| 20636 | + | |
| 20637 | + | |
| 20638 | + | |
| 20639 | + | |
| 20640 | + | |
| 20641 | + | |
| 20642 | + | |
| 20643 | + | |
| 20644 | + | |
| 20645 | + | |
| 20646 | + | |
20621 | 20647 | | |
20622 | 20648 | | |
20623 | 20649 | | |
| |||
0 commit comments