#ifndef V8_BASE_CONTAINER_UTILS_H_
#define V8_BASE_CONTAINER_UTILS_H_
#include <algorithm>
#include <iterator>
#include <optional>
#include <vector>
namespace v8::base {
template <typename C, typename T>
bool contains(const C& container, const T& element) { … }
template <typename C, typename T>
std::optional<size_t> index_of(const C& container, const T& element) { … }
template <typename C, typename P>
std::optional<size_t> index_of_if(const C& container, const P& predicate) { … }
template <typename C>
inline size_t erase_at(C& container, size_t index, size_t count = 1) { … }
template <typename C, typename P>
inline size_t erase_if(C& container, const P& predicate) { … }
template <typename C, typename P>
inline size_t count_if(const C& container, const P& predicate) { … }
template <typename C, typename P>
inline bool all_of(const C& container, const P& predicate) { … }
template <typename C>
inline bool all_of(const C& container) { … }
template <typename C, typename P>
inline bool any_of(const C& container, const P& predicate) { … }
template <typename C>
inline bool any_of(const C& container) { … }
template <typename C, typename P>
inline bool none_of(const C& container, const P& predicate) { … }
template <typename C>
inline void sort(C& container) { … }
template <typename C, typename Comp>
inline void sort(C& container, Comp comp) { … }
template <typename C>
inline bool all_equal(const C& container) { … }
template <typename C, typename T>
inline bool all_equal(const C& container, const T& value) { … }
template <typename V, typename C>
inline void vector_append(V& v, const C& container) { … }
}
#endif