Re: [PATCH] libstdc++: Constrain std::swap using concepts in C++20

2025-07-15 Thread Jonathan Wakely
On Tue, 15 Jul 2025 at 08:29, Tomasz Kaminski wrote: > > > > On Mon, Jul 14, 2025 at 10:38 PM Jonathan Wakely 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+

Re: [PATCH] libstdc++: Constrain std::swap using concepts in C++20

2025-07-15 Thread Tomasz Kaminski
On Mon, Jul 14, 2025 at 10:38 PM Jonathan Wakely 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). Otherwise LGTM. > > libstdc++-v3/ChangeLog: > > * inc

[PATCH] libstdc++: Constrain std::swap using concepts in C++20

2025-07-14 Thread Jonathan Wakely
This is a minor compile-time optimization for C++20. libstdc++-v3/ChangeLog: * include/bits/move.h (swap): Replace enable_if with concepts when available, and with __enable_if_t alias otherwise. --- Tested powerpc64le-linux. libstdc++-v3/include/bits/move.h | 30 +++