A pseudo‐iterator adaptor that is designed to implement "early increment" style loops.

Synopsis

Declared in <llvm/ADT/STLExtras.h>

template<typename WrappedIteratorT>
class early_inc_iterator_impl
    : public iterator_adaptor_base<early_inc_iterator_impl<WrappedIteratorT>, WrappedIteratorT, std::input_iterator_tag>

Description

This is not a normal iterator and should almost never be used directly. It is intended primarily to be used with range based for loops and some range algorithms.

The iterator isn't quite an OutputIterator or an InputIterator but somewhere between them. The constraints of these iterators are:

  • On construction or after being incremented, it is comparable and dereferencable. It is not incrementable.

  • After being dereferenced, it is neither comparable nor dereferencable, it is only incrementable.

This means you can only dereference the iterator once, and you can only increment it once between dereferences.

Base Classes

Name

Description

iterator_adaptor_base<early_inc_iterator_impl<WrappedIteratorT>, WrappedIteratorT, std::input_iterator_tag>

CRTP base class for adapting an iterator to a different type.

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

early_inc_iterator_impl [constructor]

Construct an early‐increment iterator at position I.

operator*

Dereference operators

operator+

Advance the iterator by n and return the result.

operator++

Increment operators

operator+=

Advance the wrapped iterator by n.

operator‐

Subtraction operators

operator‐‐

Decrement operators

operator‐=

Retreat the wrapped iterator by n.

operator‐>

Return a proxy pointer to the current element.

operator[]

Return a proxy to the element at offset n.

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.

Using Declarations

Name

Description

operator*

Bring the const dereference operator into scope.

operator++

Bring the postfix increment operator into scope.

operator‐

Bring the offset‐subtraction operator from the facade into scope.

operator‐‐

Bring the postfix decrement operator into scope.

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

wrapped

Return the wrapped underlying iterator.

Protected Data Members

Name

Description

I

Wrapped underlying iterator.

Friends

Name

Description

llvm::operator==

Compare two early‐increment iterators by underlying position.

Non-Member Functions

Name

Description

make_early_inc_range

Make a range that does early increment to allow mutation of the underlying range without disrupting iteration.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator<

Compare two adapted iterators for order.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

operator==

Return true if LHS and RHS wrap equal iterators.

Created with MrDocs