prevector::operator[]

Subscript operators

Synopses

Declared in <prevector.h>

Returns a reference to the element at position pos.

T&
operator[](size_type pos);
» more...

Returns a const reference to the element at position pos.

T const&
operator[](size_type pos) const;
» more...

Return Value

  • A reference to the element at that position.
  • A const reference to the element at that position.

Parameters

NameDescription
posThe index of the element to access.