Subscript operators

Synopses

Declared in <bdlc_queue.h>

Return a reference to the 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().

T&
operator[](int index);

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().

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

Created with MrDocs