vcpkg/toolsrc/include/vcpkg_Sets.h

18 lines
399 B
C
Raw Normal View History

#pragma once
#include "vcpkg_Checks.h"
#include <unordered_set>
2017-01-06 04:47:08 +08:00
namespace vcpkg::Sets
{
template <typename T, typename Container>
void remove_all(std::unordered_set<T>* input_set, Container remove_these)
{
2017-01-26 11:38:14 +08:00
Checks::check_exit(input_set != nullptr, "Input set cannot be null");
for (const T& r : remove_these)
{
input_set->erase(r);
}
}
2017-01-06 04:47:08 +08:00
}