#include <bn_deque.h>
template<typename Type, int MaxSize>
bn::deque class

Deque 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 ideque<Type>
Base class of 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.
~deque() defaulted noexcept
Destructor.
~deque()
Destructor.

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(const deque& other)

Copy constructor.

Parameters
other deque to copy.

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

Move constructor.

Parameters
other deque to move.

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

Copy constructor.

Parameters
other ideque to copy.

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

Move constructor.

Parameters
other ideque to move.

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

Size constructor.

Parameters
count Initial size of the deque.

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.

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

Copy assignment operator.

Parameters
other deque to copy.
Returns Reference to this.

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

Move assignment operator.

Parameters
other deque to move.
Returns Reference to this.

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

Copy assignment operator.

Parameters
other ideque to copy.
Returns Reference to this.

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

Move assignment operator.

Parameters
other ideque to move.
Returns Reference to this.