From: Patrick Palka Date: Fri, 29 May 2026 19:21:06 +0000 (-0400) Subject: libstdc++: Adjust flat_set::swap swapping order X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=f052dcf8699fa650cda20944fdd3a96104b6830c;p=thirdparty%2Fgcc.git libstdc++: Adjust flat_set::swap swapping order In r17-908 I accidentally made us swap the comparator first, but we decided that the container should be swapped first. libstdc++-v3/ChangeLog: * include/std/flat_set (_Flat_set_impl::swap): Swap _M_cont first. --- diff --git a/libstdc++-v3/include/std/flat_set b/libstdc++-v3/include/std/flat_set index 2f204cc08bf..31dce48bbe0 100644 --- a/libstdc++-v3/include/std/flat_set +++ b/libstdc++-v3/include/std/flat_set @@ -680,8 +680,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { auto __guard = _M_make_clear_guard(); auto __guard_y = _ClearGuard{__y._M_cont}; - ranges::swap(_M_comp, __y._M_comp); ranges::swap(_M_cont, __y._M_cont); + ranges::swap(_M_comp, __y._M_comp); __guard._M_disable(); __guard_y._M_disable(); }