A simple fixed-capacity ring buffer queue backed by a power-of-two sized array. Not thread-safe.
Declared in <folly/container/FixedCapacityRingQueue.h>
template<typename T>
class FixedCapacityRingQueue;
| Name | Description |
|---|---|
FixedCapacityRingQueue [constructor] | Constructors |
~FixedCapacityRingQueue [destructor] | Destroys the queue and releases its buffer. |
operator= | Assignment operators |
capacity | Returns the number of elements the queue can hold. |
empty | Returns whether the queue holds no elements. |
max_size | Returns the maximum capacity the queue can have. |
pop | Removes and returns the element at the front of the queue. |
push | Appends an element to the back of the queue if space remains. |
size | Returns the number of elements currently stored in the queue. |
| Name | Description |
|---|---|
kMaxCapacity | The maximum capacity the queue can have. |