From c699d5715b2e768ef2f7742a1894742df982038b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 22 Sep 2016 23:27:46 -0700 Subject: Introduce vcpkg::Sets utility namespace --- toolsrc/include/vcpkg_Sets.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 toolsrc/include/vcpkg_Sets.h (limited to 'toolsrc/include') diff --git a/toolsrc/include/vcpkg_Sets.h b/toolsrc/include/vcpkg_Sets.h new file mode 100644 index 000000000..7b330f31c --- /dev/null +++ b/toolsrc/include/vcpkg_Sets.h @@ -0,0 +1,17 @@ +#pragma once + +#include "vcpkg_Checks.h" +#include + +namespace vcpkg { namespace Sets +{ + template + void remove_all(std::unordered_set* input_set, Container remove_these) + { + Checks::check_throw(input_set != nullptr, "Input set cannot be null"); + for (const T& r : remove_these) + { + input_set->erase(r); + } + } +}} -- cgit v1.2.3