[libcxx-commits] [libcxx] [libc++] Implement P0528R3 `std::atomic` CAS for types with paddings (PR #76180)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 3 11:28:27 PDT 2026
================
@@ -124,23 +146,29 @@ _LIBCPP_HIDE_FROM_ABI bool __cxx_atomic_compare_exchange_strong(
_Tp __value,
memory_order __success,
memory_order __failure) _NOEXCEPT {
- return __c11_atomic_compare_exchange_strong(
- std::addressof(__a->__a_value),
- __expected,
- __value,
- static_cast<__memory_order_underlying_t>(__success),
- static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
+ return __atomic_cas_with_clear_padding(
----------------
ldionne wrote:
```suggestion
return std::__atomic_cas_with_clear_padding(
```
Also below?
https://github.com/llvm/llvm-project/pull/76180
More information about the libcxx-commits
mailing list