Random‐access iterator over the elements of an AnySpan.

Synopsis

Declared in <absl/types/any_span.h>

class iterator
    : public IteratorBase<iterator, T>

Base Classes

Name

Description

IteratorBase<iterator, T>

Type Aliases

Name

Description

difference_type

A signed type used for iterator differences.

iterator_category

The iterator category (random access).

pointer

A pointer to an element.

reference

A reference to an element.

value_type

The element type with const removed.

Member Functions

Name

Description

iterator [constructor]

Constructs an invalid iterator.

operator*

Dereferences the iterator.

operator+

Returns an iterator advanced by d positions.

operator++

Advances the iterator by one position.

operator+=

Advances the iterator by d positions.

operator‐

Subtraction operators

operator‐‐

Moves the iterator back by one position.

operator‐=

Moves the iterator back by d positions.

operator‐>

Accesses members of the current element.

operator[]

Accesses the element i positions from the current one.

Using Declarations

Protected Data Members

Name

Description

container_

The span this iterator points into.

index_

The current element index.

Friends

Name

Description

absl::AnySpan

A type‐erased, non‐owning view over a random‐access sequence.

Created with MrDocs