add specialized contains function for unordered_set
This commit is contained in:
parent
42d7fcacd8
commit
2342e7686f
|
@ -7,6 +7,7 @@
|
|||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace Kakoune
|
||||
{
|
||||
|
@ -182,6 +183,12 @@ bool contains(Container&& container, const T& value)
|
|||
return (not container.empty()) and find(container, value) != container.end();
|
||||
}
|
||||
|
||||
template<typename T1, typename T2>
|
||||
bool contains(const std::unordered_set<T1>& container, const T2& value)
|
||||
{
|
||||
return container.find(value) != container.end();
|
||||
}
|
||||
|
||||
// *** On scope end ***
|
||||
//
|
||||
// on_scope_end provides a way to register some code to be
|
||||
|
|
Loading…
Reference in New Issue
Block a user