A ring buffer queue backed by a power‐of‐two sized array that grows on overflow. Not thread‐safe.

Synopsis

Declared in <folly/container/DynamicRingQueue.h>

template<typename T>
class DynamicRingQueue;

Member Functions

Name

Description

DynamicRingQueue [constructor]

Constructors

~DynamicRingQueue [destructor]

Destroys the queue and releases its buffer.

operator=

Assignment operators

capacity

Returns the number of elements the queue can hold without growing.

empty

Returns whether the queue holds no elements.

max_size

Returns the maximum capacity the queue can grow to.

pop

Removes and returns the element at the front of the queue.

push

Appends an element to the back of the queue, growing if full.

size

Returns the number of elements currently stored in the queue.

Static Data Members

Name

Description

kMaxCapacity

The maximum capacity the queue can grow to.

Friends

Name

Description

DynamicRingQueueTestHelper

Test helper granting access to DynamicRingQueue internals.

Created with MrDocs