Return a reference to the element at the specified index offset.

Synopsis

Declared in <bslstl_randomaccessiterator.h>

T&
operator[](difference_type index) const;

Description

Return a reference to the element at the specified index positions past the current one. The behavior is undefined unless the referenced position lies within the underlying sequence. Note that index may be negative.

Return Value

reference to the element at the specified index offset

Parameters

Name

Description

index

offset from the current iterator position

Created with MrDocs