template<typename TypeT, typename AllocT = allocator<TypeT>>
struct fennec::deque< TypeT, AllocT >
This behaves the similar to fennec::list, however it does not allow arbitrary access, insertion, or deletion. It is one of the few data structures in this library that is stable, i.e. pointers to elements do not change.
| Property | Value |
| stable | ✅ |
| dynamic | ✅ |
| homogenous | ✅ |
| distinct | ⛔ |
| ordered | ⛔ |
| space | \(O(N)\) |
| linear | ⛔ |
| access | \(O(1)\) |
| find | \(O(N)\) |
| insertion | \(O(1)\) |
| deletion | \(O(1)\) |
- Template Parameters
-
|
|
|
| deque () |
| | Default Constructor, initializes an empty deque.
|
| |
| | deque (const alloc_t &alloc) |
| | Alloc Constructor, initializes an empty deque with the specified allocator.
|
| |
| | deque (const deque &deque) |
| | Copy Constructor.
|
| |
| | deque (deque &&deque) noexcept |
| | Deque Move Constructor.
|
| |
|
| ~deque () |
| | Destructor, calls deque::clear.
|
| |
|
| constexpr bool | empty () const |
| |
| constexpr size_t | size () const |
| |
|
| value_t & | front () |
| |
| const value_t & | front () const |
| |
| value_t & | back () |
| |
| const value_t & | back () const |
| |
|
| void | push_front (value_t &&elem) |
| | Push Front Move, moves a value to the front of the deque.
|
| |
| void | push_front (const value_t &elem) |
| | Push Front Copy, copies a value to the front of the deque.
|
| |
| template<typename... ArgsT> |
| void | emplace_front (ArgsT &&...args) |
| | Emplace Front, constructs a new value at the front of the deque.
|
| |
| void | push_back (value_t &&elem) |
| | Push Back Move, moves a value to the back of the deque.
|
| |
| void | push_back (const value_t &elem) |
| | Push Back Copy, copies a value to the back of the deque.
|
| |
| template<typename... ArgsT> |
| void | emplace_back (ArgsT &&...args) |
| | Emplace Back, constructs a new value at the back of the deque.
|
| |
|
void | clear () |
| | Clears the contents of the deque.
|
| |
|
void | pop_front () |
| | Erase the First Element.
|
| |
|
void | pop_back () |
| | Erase the Last Element.
|
| |