A utility class used to implement an iterator that contains some base object and an index. The iterator moves the index but keeps the base constant.

Synopsis

Declared in <llvm/ADT/STLExtras.h>

template<
    typename DerivedT,
    typename BaseT,
    typename T,
    typename PointerT = T*,
    typename ReferenceT = T&>
class indexed_accessor_iterator
    : public llvm::iterator_facade_base<DerivedT, std::random_access_iterator_tag, T, std::ptrdiff_t, PointerT, ReferenceT>

Base Classes

Name

Description

llvm::iterator_facade_base<DerivedT, std::random_access_iterator_tag, T, std::ptrdiff_t, PointerT, ReferenceT>

CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of the interface.

Type Aliases

Name

Description

difference_type

Signed type used to express the distance between iterators.

iterator_category

Iterator category tag for this facade.

pointer

Pointer type returned by the iterator.

reference

Reference type returned by the iterator.

value_type

Value type produced by the iterator.

Enums

Name

Description

Unnamed enum

Capability flags for the iterator category.

Member Functions

Name

Description

getBase

Returns the current base of the iterator.

getIndex

Returns the current index of the iterator.

operator+

Advance the iterator by n and return the result.

operator++

Increment operators

operator+=

Move the iterator offset positions forward.

operator‐

Subtraction operators

operator‐‐

Decrement operators

operator‐=

Move the iterator offset positions backward.

operator‐>

Return a proxy pointer to the current element.

operator[]

Return a proxy to the element at offset n.

operator==

Return true if both iterators share the same base and index.

operator<

Return true if this iterator precedes rhs over the same base.

operator<=

Return true if this iterator is less than or equal to RHS.

operator>

Return true if this iterator is greater than RHS.

operator>=

Return true if this iterator is greater than or equal to RHS.

Protected Types

Name

Description

PointerProxy

Proxy that yields a pointer from a copied reference.

ReferenceProxy

Proxy that yields a reference from a copied iterator.

Protected Member Functions

Name

Description

indexed_accessor_iterator [constructor]

Construct an iterator over base at index.

Protected Data Members

Name

Description

base

Object providing indexed element access.

index

Zero‐based index into base.

Non-Member Functions

Name

Description

operator+

Return an iterator n positions after i.

Derived Classes

Name

Description

iterator

An iterator element of this range.

Created with MrDocs