mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 12:53:02 +08:00
Introduce Util::Sets::contains()
This commit is contained in:
parent
286625e09e
commit
8a952743a3
@ -20,6 +20,15 @@ namespace vcpkg::Util
|
||||
}
|
||||
}
|
||||
|
||||
namespace Sets
|
||||
{
|
||||
template<class Container, class T = ElementT<Container>>
|
||||
bool contains(const Container& container, const T& item)
|
||||
{
|
||||
return container.find(item) != container.cend();
|
||||
}
|
||||
}
|
||||
|
||||
template<class Cont, class Func>
|
||||
using FmapOut = decltype(std::declval<Func>()(*begin(std::declval<Cont>())));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user