[Bug c++/123875] [13/14/15/16 Regression] atomic<X>(X) cosntructor is usable at compile time in C++14 and later
tkaminsk at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 29 12:12:46 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123875
--- Comment #2 from Tomasz Kamiński <tkaminsk at gcc dot gnu.org> ---
We do not yet implement C++26 constexpr support for atomic, so we ignore
examples like for time being:
```
consteval void f()
{
std::atomic<X> x(X{1, 2});
X x1{};
x.compare_exchange_strong(x1, X{3, 4});
}
```
More information about the Gcc-bugs
mailing list