Read‐only contiguous iterator over the container's elements.

Synopsis

Declared in <prevector.h>

class const_iterator;

Type Aliases

Name

Description

difference_type

Signed type used to represent distances between iterators.

element_type

Element type this iterator refers to.

iterator_category

Iterator category tag: models a contiguous iterator.

pointer

Pointer to the const element type.

reference

Reference to the const element type.

Member Functions

Name

Description

const_iterator [constructor]

Constructors

operator*

Returns a reference to the pointed‐to element.

operator+

Returns an iterator advanced by n elements.

operator++

Increment operators

operator+=

Advances this iterator by n elements.

operator‐

Returns an iterator moved back by n elements.

operator‐‐

Decrement operators

operator‐=

Moves this iterator back by n elements.

operator‐>

Returns a pointer to the pointed‐to element.

operator[]

Returns a reference to the element at offset pos.

operator==

Returns whether two iterators refer to the same element.

operator<=>

Orders two iterators by the addresses they refer to.

Friends

Name

Description

operator+

Returns an iterator advanced by n elements.

operator‐

Returns the distance between two iterators.

Created with MrDocs