diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index c76ca01aca..e5ead6d3af 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -37,6 +37,12 @@ namespace vcpkg::Util return ret; } + template + void stable_keep_if(Container& cont, Pred pred) + { + cont.erase(std::stable_partition(cont.begin(), cont.end(), pred), cont.end()); + } + template void unstable_keep_if(Container& cont, Pred pred) {