#include <bn_forward_list.h>
template<typename Type, int MaxSize>
forward_list class
std::forward_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 iforward_list<Type>
- Base class of bn::
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() defaulted noexcept
- Destructor.
- ~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_ |
template<typename Type, int MaxSize>
bn:: forward_list<Type, MaxSize>:: forward_list(forward_ list&& other) noexcept
Move constructor.
Parameters | |
---|---|
other | forward_ |
template<typename Type, int MaxSize>
bn:: forward_list<Type, MaxSize>:: forward_list(const iforward_ list<Type>& other)
Copy constructor.
Parameters | |
---|---|
other | iforward_ |
template<typename Type, int MaxSize>
bn:: forward_list<Type, MaxSize>:: forward_list(iforward_ list<Type>&& other) noexcept
Move constructor.
Parameters | |
---|---|
other | iforward_ |
template<typename Type, int MaxSize>
bn:: forward_list<Type, MaxSize>:: forward_list(size_ type count)
Size constructor.
Parameters | |
---|---|
count | Initial size of the forward_ |
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_ |
value | Value to fill the forward_ |
template<typename Type, int MaxSize>
forward_ list& bn:: forward_list<Type, MaxSize>:: operator=(const forward_ list& other)
Copy assignment operator.
Parameters | |
---|---|
other | forward_ |
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_ |
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_ |
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_ |
Returns | Reference to this. |