#include <bn_deque.h>
template<typename Type, int MaxSize>
deque class
A std::deque
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 ideque<Type>
- Base class of bn::
deque.
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 ideque<Type>::iterator
- Iterator alias.
- using const_iterator = typename ideque<Type>::const_iterator
- Const iterator alias.
- using reverse_iterator = typename ideque<Type>::reverse_iterator
- Reverse iterator alias.
- using const_reverse_iterator = typename ideque<Type>::const_reverse_iterator
- Const reverse iterator alias.
Constructors, destructors, conversion operators
- deque()
- Default constructor.
- deque(const deque& other)
- Copy constructor.
- deque(deque&& other) noexcept
- Move constructor.
- deque(const ideque<Type>& other)
- Copy constructor.
- deque(ideque<Type>&& other) noexcept
- Move constructor.
-
deque(size_
type count) explicit - Size constructor.
-
deque(size_
type count, const_ reference value) - Size constructor.
Public functions
- auto operator=(const deque& other) -> deque&
- Copy assignment operator.
- auto operator=(deque&& other) -> deque& noexcept
- Move assignment operator.
- auto operator=(const ideque<Type>& other) -> deque&
- Copy assignment operator.
- auto operator=(ideque<Type>&& other) -> deque& noexcept
- Move assignment operator.
Function documentation
template<typename Type, int MaxSize>
bn:: deque<Type, MaxSize>:: deque(size_ type count,
const_ reference value)
Size constructor.
Parameters | |
---|---|
count | Initial size of the deque. |
value | Value to fill the deque with. |