On Tue, 15 Jul 2025 at 08:29, Tomasz Kaminski <tkami...@redhat.com> wrote: > > > > On Mon, Jul 14, 2025 at 10:38 PM Jonathan Wakely <jwak...@redhat.com> wrote: >> >> This is a minor compile-time optimization for C++20. > > Please mention that you also replaced _GLIBCXX20_CONSTEXPR, with > constexpr under __glibcxx_concepts (that is >= c++ 20).
I've just discovered that the last non-Clang-based version of Intel icc did not define __cpp_concepts in its C++20 mode: https://godbolt.org/z/vbTzjxoro And so __glibcxx_concepts won't be defined for that compiler. Sigh. This means std::swap will no longer be constexpr in C++20 mode, so I might put the _GLIBCXX20_CONSTEXPR back in the #elif __cplusplus >= 201103L group.