On Mon, 29 Sept 2025 at 18:30, François Dumont <[email protected]> wrote:
> Now that your part is in here is the new patch for the small cleanup left. > > libstdc++: std::inplace_vector implementation cleaup > > Remove duplicated std::swap implementations. > > libstdc++-v3/ChangeLog > > * include/std/inplace_vector: > (std::swap(inplace_vector<>&, inplace_vector<>&)): Remove > the duplicated > implementation at std namespace level. Keep the friend > inline one. > (inplace_vector<Tp, 0>::assign(initializer_list<>): Add > missing return > statement. > > > Tested under Linux x86_64, > > ok to commit ? > Yes, thanks. > > François > > > On 9/22/25 20:04, Jonathan Wakely wrote: > > On Mon, 22 Sept 2025 at 18:15, François Dumont <[email protected]> > wrote: > >> Some minor points spotted while working on the _GLIBCXX_DEBUG > >> implementation. > >> > >> I'm surprised that gcc did not complained about the duplicated std::swap > >> implementation. He seems to be smart enough to see that it is the same > >> despite the different noexcept qualification. > > No, they're not the same. The friend one is a non-template function > > which is defined for every std::inplace_vector specialization, and the > > one at namespace scope is a function template. > > > > It's still correct to remove the one at namespace scope, but GCC is > > right to not complain. > > > >> libstdc++: std::inplace_vector implementation cleaup > >> > >> Remove duplicated std::swap implementations. > >> > >> Remove use of std::ref in std::erase_if. > >> > >> libstdc++-v3/ChangeLog > >> > >> * include/std/inplace_vector: Remove refwrap.h include. > >> (std::swap(inplace_vector<>&, inplace_vector<>&)): Remove > >> the duplicated > >> implementation at std namespace level. Keep the friend > >> inline one. > >> (std::erase_if): Remove std::ref usage. > >> > >> 23_containers/inplace_vector tests run under Linux x86_64. > >> > >> Ok to commit ? > > No, I'm already changing erase_if and erase in > > > https://forge.sourceware.org/gcc/gcc-TEST/pulls/78/commits/4d4a7dd885afca17a526caf504463310b3159587 > > which I'm about to push. > >
