5#ifndef BASE_CONTAINER_UTILS_H_
6#define BASE_CONTAINER_UTILS_H_
13template <
class T,
class Allocator,
class Predicate>
14size_t EraseIf(std::vector<T, Allocator>& container, Predicate pred) {
15 auto it = std::remove_if(container.begin(), container.end(), pred);
17 container.erase(it, container.end());
21template <
typename Container,
typename Value>
23 return container.find(
value) != container.end();
int find(T *array, int N, T item)
size_t EraseIf(std::vector< T, Allocator > &container, Predicate pred)
bool Contains(const Container &container, const Value &value)