Re: [PATCH] libstdc++: Use 'if constexpr' to simplify std::vector relocation

2025-04-29 Thread Tomasz Kaminski
On Tue, Apr 29, 2025 at 10:56 AM Jonathan Wakely wrote: > Simplify std::vector's use of std::__relocate_a by using 'if constexpr' > even in C++11 and C++14, with diagnostic pragmas to disable warnings. > This allows us to call std::__relocate_a directly, instead of via > _S_relocate and tag distp

[PATCH] libstdc++: Use 'if constexpr' to simplify std::vector relocation

2025-04-29 Thread Jonathan Wakely
Simplify std::vector's use of std::__relocate_a by using 'if constexpr' even in C++11 and C++14, with diagnostic pragmas to disable warnings. This allows us to call std::__relocate_a directly, instead of via _S_relocate and tag distpatching. Preserve _S_relocate so that explicit instantiations sti