Function RingBuffer.opIndex

Returns a mutable reference by logical FIFO index.

ref T opIndex(
  size_t logicalIndex
) scope;

ref const(T) opIndex(
  size_t logicalIndex
) scope const;

Parameters

NameDescription
logicalIndex zero-based position in FIFO order

Returns

Borrowed reference to the selected live element.

Preconditions

logicalIndex < length.