3 #include <opals/fwd.hpp>
9 struct random_access_iterator_tag;
28 operator bool()
const noexcept;
62 template<
class ForX,
class ForBool>
63 using ForXOrBool =
typename std::conditional<!std::is_same<T, bool>::value, ForX, ForBool>::type;
65 template<
bool Const,
bool Forward>
74 using size_type = std::size_t;
75 using difference_type = std::ptrdiff_t;
76 using reference = ForXOrBool<T&, BoolReference>;
77 using const_reference = ForXOrBool<T const&, bool>;
78 using pointer = ForXOrBool<T*, iterator>;
79 using const_pointer = ForXOrBool<T const*, const_iterator>;
85 Vector(size_type n,
const T& value);
100 void assign(size_type count,
const T& value);
128 reference at(size_type pos);
129 const_reference at(size_type pos) const;
131 reference operator[](size_type n);
132 const_reference operator[](size_type n) const;
136 const_reference front() const;
137 const_reference back() const;
142 size_type size() const noexcept;
143 size_type max_size() const noexcept;
144 size_type capacity() const noexcept;
145 bool empty() const noexcept;
146 void shrink_to_fit();
147 void clear() noexcept;
148 void resize(size_type n, T value = T());
149 void reserve(size_type n);
154 void push_back(const T& val);
178 template<
bool Const,
bool Forward>
186 using ConstSel =
typename std::conditional<Const, U const, U>::type;
187 template<
class ForX,
class ForBool>
188 using ForXOrBool =
typename std::conditional<!std::is_same<T, bool>::value, ForX, ForBool>::type;
190 using iterator_category = std::random_access_iterator_tag;
191 using value_type = ConstSel<T>;
192 using difference_type = std::ptrdiff_t;
193 using reference =
typename std::conditional<Const, typename Vector::const_reference, typename Vector::reference>::type;
194 using pointer = ForXOrBool<ConstSel<value_type>*,
void>;
213 reference operator* ()
const;
214 pointer operator->()
const;
215 reference operator[](difference_type offset)
const;
224 Iterator& operator+=(difference_type offset);
225 Iterator operator+ (difference_type offset)
const;
226 Iterator& operator-=(difference_type offset);
227 Iterator operator- (difference_type offset)
const;