packs manager (unused yet)

This commit is contained in:
MihailRis
2024-04-08 03:17:44 +03:00
parent 68320629de
commit 95fedfa3a3
3 changed files with 175 additions and 1 deletions
+8 -1
View File
@@ -1,13 +1,20 @@
#ifndef UTIL_LISTUTIL_H_
#define UTIL_LISTUTIL_H_
#include <algorithm>
#include <vector>
#include <queue>
namespace util {
template<class T>
bool contains(std::vector<T> vec, const T& value) {
bool contains(const std::vector<T>& vec, const T& value) {
return std::find(vec.begin(), vec.end(), value) != vec.end();
}
template<class T>
bool contains(const std::queue<T>& queue, const T& value) {
return std::find(queue.begin(), queue.end(), value) != queue.end();
}
}
#endif // UTIL_LISTUTIL_H_