| 85 | #if _MSC_VER |
| 86 | |
| 87 | memory_order msvc_select_cas_order(memory_order success, memory_order failure) |
| 88 | { |
| 89 | // Promote to acq_rel if release success is combined with acquire/consume failure. |
| 90 | if (success == memory_order_release && (failure == memory_order_acquire || failure == memory_order_consume)) |
| 91 | { |
| 92 | return memory_order_acq_rel; |
| 93 | } |
| 94 | // Otherwise, the success order is sufficient, because for all other cases |
| 95 | // the load part of the RMW is at least as strong as the failure load. |
| 96 | // (e.g. acquire, acq_rel, seq_cst success imply an acquire load). |
| 97 | return success; |
| 98 | } |
| 99 | |
| 100 | #endif |
| 101 |
no outgoing calls
no test coverage detected