https://gcc.gnu.org/g:5cdd78b39725fb1d82cb6bd68e8f56bf4f5d51cd

commit r15-6024-g5cdd78b39725fb1d82cb6bd68e8f56bf4f5d51cd
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Mon Dec 9 09:36:15 2024 +0000

    libstdc++: Add missing equality comparison in new tests [PR117921]
    
    These new tests fail in Debug Mode because the allocator types aren't
    equality comparable.
    
    libstdc++-v3/ChangeLog:
    
            PR libstdc++/117921
            * testsuite/23_containers/set/modifiers/swap/adl.cc: Add
            equality comparison for Allocator.
            * testsuite/23_containers/unordered_set/modifiers/swap-2.cc:
            Likewise.

Diff:
---
 libstdc++-v3/testsuite/23_containers/set/modifiers/swap/adl.cc         | 1 +
 libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/swap-2.cc | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libstdc++-v3/testsuite/23_containers/set/modifiers/swap/adl.cc 
b/libstdc++-v3/testsuite/23_containers/set/modifiers/swap/adl.cc
index 2b7975a366fc..e2a1742c953a 100644
--- a/libstdc++-v3/testsuite/23_containers/set/modifiers/swap/adl.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/modifiers/swap/adl.cc
@@ -36,6 +36,7 @@ namespace adl
       using propagate_on_container_swap = std::true_type;
 
       friend void swap(Allocator&, Allocator&) { swapped = true; }
+      friend bool operator==(Allocator, Allocator) { return true; }
     };
 }
 
diff --git 
a/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/swap-2.cc 
b/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/swap-2.cc
index a0fb1a6f662f..9d8b2200e24c 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/swap-2.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/swap-2.cc
@@ -43,6 +43,7 @@ namespace adl
       using propagate_on_container_swap = std::true_type;
 
       friend void swap(Allocator&, Allocator&) { swapped = true; }
+      friend bool operator==(Allocator, Allocator) { return true; }
     };
 }

Reply via email to