template<typename Type, int MaxSize>
bn::forward_list class

Forward list 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 iforward_list<Type>
Base class of forward_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 iforward_list<Type>::iterator
Iterator alias.
using const_iterator = typename iforward_list<Type>::const_iterator
Const iterator alias.

Constructors, destructors, conversion operators

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

Public functions

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

Function documentation

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

Copy constructor.

Parameters
other forward_list to copy.

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

Move constructor.

Parameters
other forward_list to move.

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

Copy constructor.

Parameters
other iforward_list to copy.

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

Move constructor.

Parameters
other iforward_list to move.

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

Size constructor.

Parameters
count Initial size of the forward_list.

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

Size constructor.

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

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

Copy assignment operator.

Parameters
other forward_list to copy.
Returns Reference to this.

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

Move assignment operator.

Parameters
other forward_list to move.
Returns Reference to this.

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

Copy assignment operator.

Parameters
other iforward_list to copy.
Returns Reference to this.

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

Move assignment operator.

Parameters
other iforward_list to move.
Returns Reference to this.