23#include <initializer_list>
43 using value_type =
typename internal_vector_type::value_type;
52 using reference =
typename internal_vector_type::reference;
58 using pointer =
typename internal_vector_type::pointer;
64 using iterator =
typename internal_vector_type::iterator;
74 typename internal_vector_type::const_reverse_iterator;
106 return vector_[
static_cast<std::size_t
>(index)];
116 return vector_[
static_cast<std::size_t
>(index)];
Class of vectors wrapping std::vector class to use singed integers as indices.
auto size() const -> index_type
Get the size of this vector.
auto data() const noexcept -> const_pointer
Get the pointer to the first element.
typename internal_vector_type::const_reverse_iterator const_reverse_iterator
Type of const reverse iterators.
typename internal_vector_type::const_reference const_reference
Type of const references.
typename internal_vector_type::iterator iterator
Type of iterators.
auto begin() const -> const_iterator
Get the iterator to the first element.
typename internal_vector_type::reverse_iterator reverse_iterator
Type of reverse iterators.
auto front() const -> const_reference
Access to the front element.
typename internal_vector_type::const_iterator const_iterator
Type of const iterators.
auto end() -> iterator
Get the past-the-end iterator.
index_type size_type
Type of sizes.
std::vector< T > internal_vector_type
Type of actual vectors.
typename internal_vector_type::difference_type difference_type
Type of differences of pointers.
vector(std::initializer_list< T > values)
Constructor.
typename internal_vector_type::reference reference
Type of references.
auto cend() const -> const_iterator
Get the past-the-end iterator.
auto data() noexcept -> pointer
Get the pointer to the first element.
auto front() -> reference
Access to the front element.
typename internal_vector_type::value_type value_type
Type of values.
internal_vector_type vector_
Actual vector.
vector(index_type size, value_type value=value_type())
Constructor.
vector()=default
Constructor.
auto empty() const -> bool
Check whether this vector is empty.
auto operator[](index_type index) -> reference
Access to an element.
auto back() const -> const_reference
Access to the final element.
void resize(index_type size)
Change the size.
auto operator[](index_type index) const -> const_reference
Access to an element.
auto begin() -> iterator
Get the iterator to the first element.
auto cbegin() const -> const_iterator
Get the iterator to the first element.
auto end() const -> const_iterator
Get the past-the-end iterator.
void reserve(index_type size)
Reserve memory.
typename internal_vector_type::pointer pointer
Type of pointers.
void push_back(const value_type &value)
Add an element.
void clear()
Remove the all elements in this vector.
auto back() -> reference
Access to the final element.
void push_back(value_type &&value)
Add an element.
typename internal_vector_type::const_pointer const_pointer
Type of const pointers.
Definition of index_type type.
std::ptrdiff_t index_type
Type of indices in this library.