Introduce Util::stable_keep_if()
MODIFY
include/vcpkg_Util.h
include/vcpkg_Util.h
@@ -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)
{

Introduce Util::stable_keep_if()