[libcxx-commits] [libcxx] [libc++] Make `_Atomic(T)` directly use an alias template (PR #168679)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 20 04:26:25 PST 2025


frederick-vs-ja wrote:

> Then it should be mentioned in the wording IMO. as-is it's not at all clear what the intention is - and at least two out of three implementation have done the obvious thing. AFAICT this effect was never intended.

I'm sure that it was intended to use something other than plain `std::atomic<T>`, as this was the changed part between [P0943R5](http://wg21.link/p0943r5) and [P0943R6](http://wg21.link/p0943r6). But the motivation is not clear to me. It's possibly related to:
> It is unspecified whether `<stdatomic.h>` makes available any declarations in namespace `std`.

(now in [[stdatomic.h.syn]/1](https://eel.is/c++draft/stdatomic.h.syn#1)), but the relation is not very clear, either.

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


More information about the libcxx-commits mailing list