Skip to content

Commit

Permalink
libstdc++: Add missing equality comparison in new tests [PR117921]
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jwakely committed Dec 9, 2024
1 parent 0b79d8b commit 5cdd78b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
};
}

Expand Down

0 comments on commit 5cdd78b

Please sign in to comment.