#include <bn_vector.h>
template<typename Type, int MaxSize>
bn::vector class

Vector implementation that uses a fixed size buffer.

Template parameters
Type Element type.
MaxSize Maximum number of elements that can be stored.

Base classes

template<typename Type>
class ivector<Type>
Base class of vector.

Public types

using value_type = Type
Value type alias.
using size_type = int
Size type alias.
using difference_type = int
Difference type alias.
using reference = Type&
Reference alias.
using const_reference = const Type&
Const reference alias.
using pointer = Type*
Pointer alias.
using const_pointer = const Type*
Const pointer alias.
using iterator = Type*
Iterator alias.
using const_iterator = const Type*
Const iterator alias.
using reverse_iterator = bn::reverse_iterator<iterator>
Reverse iterator alias.
using const_reverse_iterator = bn::reverse_iterator<const_iterator>
Const reverse iterator alias.

Constructors, destructors, conversion operators

vector()
Default constructor.
vector(const vector& other)
Copy constructor.
vector(vector&& other) noexcept
Move constructor.
vector(const ivector<Type>& other)
Copy constructor.
vector(ivector<Type>&& other) noexcept
Move constructor.
vector(size_type count) explicit
Size constructor.
vector(size_type count, const_reference value)
Size constructor.
~vector() defaulted noexcept
Destructor.
~vector()
Destructor.

Public functions

auto operator=(const vector& other) -> vector&
Copy assignment operator.
auto operator=(vector&& other) -> vector& noexcept
Move assignment operator.
auto operator=(const ivector<Type>& other) -> vector&
Copy assignment operator.
auto operator=(ivector<Type>&& other) -> vector& noexcept
Move assignment operator.

Function documentation

template<typename Type, int MaxSize>
bn::vector<Type, MaxSize>::vector(const vector& other)

Copy constructor.

Parameters
other vector to copy.

template<typename Type, int MaxSize>
bn::vector<Type, MaxSize>::vector(vector&& other) noexcept

Move constructor.

Parameters
other vector to move.

template<typename Type, int MaxSize>
bn::vector<Type, MaxSize>::vector(const ivector<Type>& other)

Copy constructor.

Parameters
other ivector to copy.

template<typename Type, int MaxSize>
bn::vector<Type, MaxSize>::vector(ivector<Type>&& other) noexcept

Move constructor.

Parameters
other ivector to move.

template<typename Type, int MaxSize>
bn::vector<Type, MaxSize>::vector(size_type count) explicit

Size constructor.

Parameters
count Initial size of the vector.

template<typename Type, int MaxSize>
bn::vector<Type, MaxSize>::vector(size_type count, const_reference value)

Size constructor.

Parameters
count Initial size of the vector.
value Value to fill the vector with.

template<typename Type, int MaxSize>
vector& bn::vector<Type, MaxSize>::operator=(const vector& other)

Copy assignment operator.

Parameters
other vector to copy.
Returns Reference to this.

template<typename Type, int MaxSize>
vector& bn::vector<Type, MaxSize>::operator=(vector&& other) noexcept

Move assignment operator.

Parameters
other vector to move.
Returns Reference to this.

template<typename Type, int MaxSize>
vector& bn::vector<Type, MaxSize>::operator=(const ivector<Type>& other)

Copy assignment operator.

Parameters
other ivector to copy.
Returns Reference to this.

template<typename Type, int MaxSize>
vector& bn::vector<Type, MaxSize>::operator=(ivector<Type>&& other) noexcept

Move assignment operator.

Parameters
other ivector to move.
Returns Reference to this.