diff --git a/src/utils.hh b/src/utils.hh index 2bf0ce80..f9e72703 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -159,7 +159,7 @@ auto find_if(Container& container, T op) -> decltype(container.begin()) template bool contains(const Container& container, const T& value) { - return find(container, value) != container.end(); + return (not container.empty()) and find(container, value) != container.end(); } // *** On scope end ***