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

Jan Schultke via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 20 01:56:48 PST 2025


eisenwave wrote:

> If people really want to make it possible to reject such code it can be worded that way.

It already is worded that way. Whether intentional or not, I find it to be a convenient consequence of the alias template that you cannot write `struct _Atomic(int)`. This also increase the symmetry with C.

Maybe we could achieve the same in wording by saying that it expands to `struct ::std::atomic<int>`; the added `struct` before `_Atomic` would then also be disallowed because there would be two `struct`s. That's arguably an evolutionary change though, rather than fixing any kind of defect in the wording.

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


More information about the libcxx-commits mailing list