gfm



class  QueueImpl(T, OverflowPolicy overflowPolicy);

Doubly-indexed queue, can be used as a FIFO or stack.

Known Bugs
Doesn't call struct destructors, don't scan memory. You should probably only put POD types in them.

nothrow this(size_t initialCapacity);

Create a QueueImpl with specified initial capacity.


const pure nothrow @property bool  isFull();

Returns
true if the queue is full.

const pure nothrow @property size_t  capacity();

Returns
 capacity of the queue.

nothrow void  pushBack(T x);

Adds an item on the back of the queue.


nothrow void  pushFront(T x);

Adds an item on the front of the queue.


nothrow T  popFront();

Removes an item from the front of the queue.

Returns
the removed item.

nothrow T  popBack();

Removes an item from the back of the queue.

Returns
the removed item.

nothrow void  clear();

Removes all items from the queue.


const pure nothrow size_t  length();

Returns
number of items in the queue.

pure T  front();

Returns
item at the  front of the queue.

pure T  back();

Returns
item on the  back of the queue.

T  opIndex(size_t index);

Returns
item index from the queue.

nothrow Range  opSlice();

Returns
random-access range over the whole queue.

nothrow Range  opSlice(size_t i, size_t j);

Returns
random-access range over a queue sub-range.

template  Queue(T)

A queue that can only grow.

See Also
QueueImpl

template  FixedSizeQueue(T)

A fixed-sized queue that will crash on overflow.

See Also
QueueImpl

template  RingBuffer(T)

Ring buffer, it drops if its capacity is exceeded.

See Also
QueueImpl