diff --git a/src/utils.hh b/src/utils.hh index e7315cc2..73950562 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -7,6 +7,7 @@ #include #include #include +#include namespace Kakoune { @@ -182,6 +183,12 @@ bool contains(Container&& container, const T& value) return (not container.empty()) and find(container, value) != container.end(); } +template +bool contains(const std::unordered_set& 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