Skip to content

Commit 5cdd78b

Browse files
committed
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.
1 parent 0b79d8b commit 5cdd78b

File tree

2 files changed

+2
-0
lines changed
  • libstdc++-v3/testsuite/23_containers

2 files changed

+2
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ namespace adl
3636
using propagate_on_container_swap = std::true_type;
3737

3838
friend void swap(Allocator&, Allocator&) { swapped = true; }
39+
friend bool operator==(Allocator, Allocator) { return true; }
3940
};
4041
}
4142

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

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ namespace adl
4343
using propagate_on_container_swap = std::true_type;
4444

4545
friend void swap(Allocator&, Allocator&) { swapped = true; }
46+
friend bool operator==(Allocator, Allocator) { return true; }
4647
};
4748
}
4849

0 commit comments

Comments
 (0)