Defined in header <atomic> (1) (since C++11) bool compare_exchange_weak( T& expected, T desired,
std::memory_order success,
std::memory_order failure ); bool compare_exchange_weak( T& expected, T desired,
std::memory_order success,
std::memory_order failure ) volatile; (2) (since C++11) bool compare_exchange_weak( T& expected, T desired,