diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg_Util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index 4ebb2a802..fedf93c7a 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -21,4 +21,10 @@ namespace vcpkg::Util return ret; } + + template<class Container, class Pred> + void keep_if(Container& cont, Pred pred) + { + cont.erase(std::remove_if(cont.begin(), cont.end(), pred), cont.end()); + } }
\ No newline at end of file |
