1#ifndef CONTAINER_FIXED_VECTOR_H_INCLUDED
2#define CONTAINER_FIXED_VECTOR_H_INCLUDED
5#ifndef CPPELIB_NO_STD_ITERATOR
9#include "private/TypeTraits.h"
10#include "private/Construct.h"
26template <
typename T, std::
size_t MaxSize>
38#ifndef CPPELIB_NO_STD_ITERATOR
45 double dummyForAlignment;
48 InternalBuf m_realBuf;
57 return "FixedVector::BadAlloc";
72 template <
typename InputIterator>
167 return &m_virtualBuf[0];
172 return &m_virtualBuf[0];
177 return begin() + m_end;
182 return begin() + m_end;
185#ifndef CPPELIB_NO_STD_ITERATOR
260 destroy(&*(
end() - 1));
273 template <
typename InputIterator>
302 template <
typename InputIterator>
331 template <
typename U, std::
size_t N>
334 template <
typename Integer>
340 template <
typename InputIterator>
371 construct(&*
end(), *
it);
380 template <
typename InputIterator>
415 construct(&*
end(), *
it);
426template <
typename T, std::
size_t MaxSize>
432 for (std::size_t i = 0U; i < x.
size(); ++i) {
433 if (!(x[i] == y[i])) {
440template <
typename T, std::
size_t MaxSize>
#define DEBUG_ASSERT(x)
The same as CHECK_ASSERT() macro.
Definition Assertion.h:39
Definition ContainerException.h:34
STL-like vector container with fixed capacity.
Definition FixedVector.h:27
FixedVector & operator=(const FixedVector &x)
Definition FixedVector.h:90
value_type & reference
Definition FixedVector.h:34
const value_type & const_reference
Definition FixedVector.h:35
const value_type * const_iterator
Definition FixedVector.h:33
bool empty() const
Definition FixedVector.h:113
const value_type * const_pointer
Definition FixedVector.h:37
bool full() const
Definition FixedVector.h:118
void insert(iterator pos, size_type n, const T &data)
Definition FixedVector.h:296
T value_type
Definition FixedVector.h:29
reverse_iterator rbegin()
Definition FixedVector.h:186
const_reference operator[](size_type idx) const
Definition FixedVector.h:134
void insert(iterator pos, InputIterator first, InputIterator last)
Definition FixedVector.h:303
~FixedVector()
Definition FixedVector.h:85
std::size_t size_type
Definition FixedVector.h:30
pointer data()
Definition FixedVector.h:155
std::reverse_iterator< iterator > reverse_iterator
Definition FixedVector.h:39
void resize(size_type n, const T &data=T())
Definition FixedVector.h:231
void pop_back()
Definition FixedVector.h:257
const_reverse_iterator rbegin() const
Definition FixedVector.h:191
const_reference at(size_type idx) const
Definition FixedVector.h:147
size_type max_size() const
Definition FixedVector.h:103
size_type available_size() const
Definition FixedVector.h:108
iterator end()
Definition FixedVector.h:175
const_iterator end() const
Definition FixedVector.h:180
reference back()
Definition FixedVector.h:219
void push_back(const T &data)
Definition FixedVector.h:248
const_reverse_iterator rend() const
Definition FixedVector.h:201
const_pointer data() const
Definition FixedVector.h:160
FixedVector()
Definition FixedVector.h:62
iterator insert(iterator pos, const T &data)
Definition FixedVector.h:289
reference at(size_type idx)
Definition FixedVector.h:139
void clear()
Definition FixedVector.h:123
FixedVector(const FixedVector &x)
Definition FixedVector.h:79
value_type * iterator
Definition FixedVector.h:32
FixedVector(size_type n, const T &data=T())
Definition FixedVector.h:66
void assign(size_type n, const T &data)
Definition FixedVector.h:264
reverse_iterator rend()
Definition FixedVector.h:196
iterator erase(iterator first, iterator last)
Definition FixedVector.h:316
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition FixedVector.h:40
size_type size() const
Definition FixedVector.h:98
const_reference back() const
Definition FixedVector.h:225
reference operator[](size_type idx)
Definition FixedVector.h:129
void assign(InputIterator first, InputIterator last)
Definition FixedVector.h:274
std::ptrdiff_t difference_type
Definition FixedVector.h:31
friend bool operator==(const FixedVector< U, N > &x, const FixedVector< U, N > &y)
const_reference front() const
Definition FixedVector.h:213
iterator erase(iterator pos)
Definition FixedVector.h:310
const_iterator begin() const
Definition FixedVector.h:170
iterator begin()
Definition FixedVector.h:165
reference front()
Definition FixedVector.h:207
value_type * pointer
Definition FixedVector.h:36
FixedVector(InputIterator first, InputIterator last)
Definition FixedVector.h:73
Definition ContainerException.h:23
bool operator==(const Array< T, Size > &x, const Array< T, Size > &y)
Definition Array.h:160
bool operator!=(const Array< T, Size > &x, const Array< T, Size > &y)
Definition Array.h:171