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

Synopsis

Declared in <llvm/ADT/iterator.h>

template<
    typename DerivedT,
    typename WrappedIteratorT,
    typename IteratorCategoryT = std::iterator_traits<WrappedIteratorT>::iterator_category,
    typename T = std::iterator_traits<WrappedIteratorT>::value_type,
    typename DifferenceTypeT = std::iterator_traits<WrappedIteratorT>::difference_type,
    typename PointerT = std::conditional_t<std::is_same<T, typename std::iterator_traits<WrappedIteratorT>::value_type>::value, std::iterator_traits<WrappedIteratorT>::pointer, T*>,
    typename ReferenceT = std::conditional_t<std::is_same<T, typename std::iterator_traits<WrappedIteratorT>::value_type>::value, std::iterator_traits<WrappedIteratorT>::reference, T&>>
class iterator_adaptor_base
    : public iterator_facade_base<DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT>

Description

This class can be used through CRTP to adapt one iterator into another. Typically this is done through providing in the derived class a custom operator* implementation. Other methods can be overridden as well.

Base Classes

Name

Description

iterator_facade_base<DerivedT, IteratorCategoryT, T, DifferenceTypeT, 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

operator*

Dereference the wrapped iterator.

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 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

iterator_adaptor_base [constructor]

Constructors

wrapped

Return the wrapped underlying iterator.

Protected Data Members

Name

Description

I

Wrapped underlying iterator.

Friends

Name

Description

llvm::operator<

Compare two adapted iterators for order.

llvm::operator==

Return true if LHS and RHS wrap equal iterators.

Non-Member Functions

Name

Description

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.

Derived Classes

Name

Description

AACallEdgeIterator

An Iterator for call edges, creates AACallEdges attributes in a lazy way.

GSIHashIterator

Iterator over hash records producing symbol record offsets. Abstracts away the fact that symbol record offsets on disk are off‐by‐one.

ImutAVLValueIterator

Generic iterator that wraps a T::TreeTy::iterator and exposes iterator::getValue() on dereference.

MCRegUnitIterator

MCRegUnitIterator enumerates a list of register units for Reg.

MCSubRegIterator

MCSubRegIterator enumerates all sub‐registers of Reg. If IncludeSelf is set, Reg itself is included in the list.

MCSuperRegIterator

MCSuperRegIterator enumerates all super‐registers of Reg. If IncludeSelf is set, Reg itself is included in the list.

StringMapKeyIterator

Adapter that yields StringRef keys from a StringMap iterator.

WrappedSuccIterator

Successor iterator that carries the enclosing loop for edge filtering.

call_iterator

Iterator over binding‐call instructions that create resources.

call_iterator

An iterator over specifically call edges.

const_succ_iterator

The const version of succ_iterator.

const_symbol_iterator

Forward iterator over the symbols in a SymbolSet.

const_value_iterator

Const forward iterator over the DIE values in the list.

const_value_op_iterator

Const iterator for directly iterating over the operand Values.

early_inc_iterator_impl

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

filter_iterator_base

An iterator adaptor that filters the elements of given inner iterators.

iterator

An iterator used for the edges to both entry nodes and child nodes.

mapped_iterator

Iterator adapter that applies a function when dereferenced.

mapped_iterator_base

Base class for mapped iterators without stored function objects.

pointee_iterator

An iterator type that allows iterating over the pointees via some other iterator.

pointer_iterator

An iterator adaptor that yields pointers to the wrapped iterator's elements.

succ_iterator

Iterator type that casts an operand to a basic block.

value_iterator

Mutable forward iterator over the DIE values in the list.

value_op_iterator

Iterator for directly iterating over the operand Values.

value_op_iterator

Iterator for directly iterating over the operand SDValue's.

Created with MrDocs