https://gcc.gnu.org/g:f052dcf8699fa650cda20944fdd3a96104b6830c

commit r17-989-gf052dcf8699fa650cda20944fdd3a96104b6830c
Author: Patrick Palka <[email protected]>
Date:   Fri May 29 15:21:06 2026 -0400

    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:
---
 libstdc++-v3/include/std/flat_set | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/std/flat_set 
b/libstdc++-v3/include/std/flat_set
index 2f204cc08bf9..31dce48bbe0a 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();
       }

Reply via email to