A queue implemented as a linked list of fixed or variable sized blocks.
Synopsis
Declared in <absl/container/chunked_queue.h>
template<
typename T,
size_t BLo = 0,
size_t BHi = BLo,
typename Allocator = std::allocator<T>>
class chunked_queue;
Description
absl::chunked_queue provides the same interface as std::deque minus random access. It is useful when memory usage is paramount as it provides finegrained and configurable block sizing.
Type Aliases
Name |
Description |
The allocator type. |
|
A const forward iterator over the elements. |
|
A const reference to an element. |
|
A signed integer type used for iterator differences. |
|
A forward iterator over the elements. |
|
A reference to an element. |
|
An unsigned integer type used for sizes. |
|
The type of the elements stored in the queue. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroys the queue and frees all allocated storage. |
Assignment operators |
|
|
|
|
|
|
|
Returns a const iterator to the first element. |
|
Returns a const iterator past the last element. |
|
Erases all elements from the container. |
|
Appends a new element to the end of the container. |
|
Returns true if the queue contains no elements. |
|
|
|
|
|
Returns the allocator associated with the container. |
|
Returns the maximum number of elements the queue is able to hold. |
|
Removes the first element of the container. |
|
Appends the given element value to the end of the container. |
|
Resizes the container to contain |
|
Requests the removal of unused capacity. |
|
Returns the number of elements in the queue. |
|
Swaps the contents of this queue with |
Static Data Members
Name |
Description |
The maximum block size, in elements. |
|
The minimum block size, in elements. |