]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add missing equality comparison in new tests [PR117921]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 9 Dec 2024 09:36:15 +0000 (09:36 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 9 Dec 2024 09:38:00 +0000 (09:38 +0000)
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.

libstdc++-v3/testsuite/23_containers/set/modifiers/swap/adl.cc
libstdc++-v3/testsuite/23_containers/unordered_set/modifiers/swap-2.cc

index 2b7975a366fc022e88a68fecc77bc4a509b9bf50..e2a1742c953a5694e535876a7a359e4b045fc5da 100644 (file)
@@ -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; }
     };
 }
 
index a0fb1a6f662fd944844320f8cba1b8a308f2c7e8..9d8b2200e24c7705dcc19b49a76649fb8995565f 100644 (file)
@@ -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; }
     };
 }