BloombergLP::bdlc::CompactedArray_ConstIterator::operator[]

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

Synopsis

Declared in <bdlc_compactedarray.h>

TYPE const&
operator[](std::ptrdiff_t offset) const;

Description

Return a const reference to the element at the specified offset from the location referenced by this iterator. The behavior is undefined unless for this iterator, referencing a CompactedArray array, CompactedArray_ConstIterator() != *this and 0 <= *this - array.begin() + offset < array.length().

Return Value

const reference to the element at offset

Parameters

NameDescription
offsetoffset from this iterator's position