7 #ifndef IG_OMW_VECTOR_H
8 #define IG_OMW_VECTOR_H
12 #include <initializer_list>
22 template <
class T,
class Allocator = std::allocator<T>>
23 class vector :
public std::vector<T, Allocator>
25 #ifndef OMWi_DOXYGEN_PREDEFINE
27 using value_type =
typename std::vector<T, Allocator>::value_type;
28 using size_type =
typename std::vector<T, Allocator>::size_type;
29 #endif // OMWi_DOXYGEN_PREDEFINE
32 static constexpr size_type maxsz =
static_cast<size_type
>(-1);
35 vector() : std::vector<T, Allocator>() {}
36 explicit vector(size_type count) : std::vector<T, Allocator>(count) {}
37 vector(size_type count,
const T& value) : std::vector<T, Allocator>(count, value) {}
38 vector(
const T* first,
const T* last) : std::vector<T, Allocator>(first, last) {}
39 vector(std::initializer_list<T> init) : std::vector<T, Allocator>(init) {}
40 vector(
const std::vector<T, Allocator>& other) : std::vector<T, Allocator>(other) {}
43 bool contains(
const T& item)
const
46 for (size_type i = 0; (i < this->size()) && !r; ++i)
47 if (this->at(i) == item) r =
true;
51 void reserveAdd(size_type addCap) { this->reserve(this->size() + addCap); }
57 #endif // IG_OMW_VECTOR_H