#include <bn_vector.h>
template<typename Type, int MaxSize>
vector class
std::vector
like container with a fixed size buffer.
Template parameters | |
---|---|
Type | Element type. |
MaxSize | Maximum number of elements that can be stored. |
It doesn't throw exceptions. Instead, asserts are used to ensure valid usage.
Base classes
-
template<typename Type>class ivector<Type>
- Base class of bn::
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.
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(size_ type count,
const_ reference value)
Size constructor.
Parameters | |
---|---|
count | Initial size of the vector. |
value | Value to fill the vector with. |