#include <bn_list.h>
template<typename Type, int MaxSize>
bn::list class

std::list 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 ilist<Type>
Base class of bn::list.

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 = typename ilist<Type>::iterator
Iterator alias.
using const_iterator = typename ilist<Type>::const_iterator
Const iterator alias.
using reverse_iterator = typename ilist<Type>::reverse_iterator
Reverse iterator alias.
using const_reverse_iterator = typename ilist<Type>::const_reverse_iterator
Const reverse iterator alias.

Constructors, destructors, conversion operators

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

Public functions

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

Function documentation

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

Copy constructor.

Parameters
other list to copy.

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

Move constructor.

Parameters
other list to move.

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

Copy constructor.

Parameters
other ilist to copy.

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

Move constructor.

Parameters
other ilist to move.

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

Size constructor.

Parameters
count Initial size of the list.

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

Size constructor.

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

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

Copy assignment operator.

Parameters
other list to copy.
Returns Reference to this.

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

Move assignment operator.

Parameters
other list to move.
Returns Reference to this.

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

Copy assignment operator.

Parameters
other ilist to copy.
Returns Reference to this.

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

Move assignment operator.

Parameters
other ilist to move.
Returns Reference to this.