[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


================
@@ -10,6 +10,7 @@
 #define _LIBCPP___ATOMIC_SUPPORT_C11_H
----------------
ldionne wrote:

Open question: Should we implement this paper as a DR? In a certain way, this can be seen as a bug fix against the fact that `atomic<TypeWithPading>::compare_exhange` is broken before C++20. I'd be okay either way (DR or not), but as a non power user of atomics, CAS being broken for `atomic<TypeWithPadding>` is definitely not something that jumps at me as being obvious, hence the "bug report" categorization I am suggesting.

CC @frederick-vs-ja 

Also CC @jwakely and @StephanTLavavej : have you folks implemented this? If so, did you DR?

https://github.com/llvm/llvm-project/pull/76180


More information about the libcxx-commits mailing list