[all-commits] [llvm/llvm-project] 6c4c44: [SetOperations] Support set containers with remove...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed Jun 26 00:21:17 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c4c44b50ba3a08106b37fd5a739c387fef0b961
https://github.com/llvm/llvm-project/commit/6c4c44b50ba3a08106b37fd5a739c387fef0b961
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-06-26 (Wed, 26 Jun 2024)
Changed paths:
M llvm/include/llvm/ADT/SetOperations.h
M llvm/unittests/ADT/SetOperationsTest.cpp
Log Message:
-----------
[SetOperations] Support set containers with remove_if (#96613)
The current set_intersect implementation only works for std::set style
sets that have a value-erase method that does not invalidate iterators.
As such, it cannot be used for set containers like SetVector, which only
has iterator-invalidating erase.
Support such set containers by calling the remove_if method instead, if
it exists. The detection code is adopted from how contains() is detected
inside llvm::is_contained().
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list