mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 03:11:38 +08:00
Introduce Util::stable_keep_if()
This commit is contained in:
parent
68a9876682
commit
7f68aa6630
@ -37,6 +37,12 @@ namespace vcpkg::Util
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<class Container, class Pred>
|
||||
void stable_keep_if(Container& cont, Pred pred)
|
||||
{
|
||||
cont.erase(std::stable_partition(cont.begin(), cont.end(), pred), cont.end());
|
||||
}
|
||||
|
||||
template<class Container, class Pred>
|
||||
void unstable_keep_if(Container& cont, Pred pred)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user