BloombergLP::bdlc::Queue::operator[]

Return a non-modifiable reference to the element at index.

Synopsis

Declared in <bdlc_queue.h>

T const&
operator[](int index) const;

Description

Return a reference to the non-modifiable element at the specified index position in this queue. The reference will remain valid as long as this queue is not destroyed or modified (e.g., via insert, remove, or append). The behavior is undefined unless 0 <= index < length().

Return Value

non-modifiable reference to the element at index

Parameters

NameDescription
indexposition of the element to access