LLVM 19.0.0git
Public Member Functions | Public Attributes | Friends | List of all members
llvm::early_inc_iterator_impl< WrappedIteratorT > Class Template Reference

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

#include "llvm/ADT/STLExtras.h"

Inheritance diagram for llvm::early_inc_iterator_impl< WrappedIteratorT >:
Inheritance graph
[legend]

Public Member Functions

 early_inc_iterator_impl (WrappedIteratorT I)
 
early_inc_iterator_imploperator++ ()
 
- Public Member Functions inherited from llvm::iterator_adaptor_base< early_inc_iterator_impl< WrappedIteratorT >, WrappedIteratorT, std::input_iterator_tag >
early_inc_iterator_impl< WrappedIteratorT > & operator+= (difference_type n)
 
early_inc_iterator_impl< WrappedIteratorT > & operator-= (difference_type n)
 
difference_type operator- (const early_inc_iterator_impl< WrappedIteratorT > &RHS) const
 
early_inc_iterator_impl< WrappedIteratorT > & operator++ ()
 
early_inc_iterator_impl< WrappedIteratorT > & operator-- ()
 
std::conditional_t< std::is_same< typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::value_type >::value, typename std::iterator_traits< WrappedIteratorT >::reference, typename std::iterator_traits< WrappedIteratorT >::value_type & > operator* () const
 
- Public Member Functions inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
DerivedT operator+ (DifferenceTypeT n) const
 
DerivedT operator- (DifferenceTypeT n) const
 
DerivedT & operator++ ()
 
DerivedT operator++ (int)
 
DerivedT & operator-- ()
 
DerivedT operator-- (int)
 
bool operator!= (const DerivedT &RHS) const
 
bool operator> (const DerivedT &RHS) const
 
bool operator<= (const DerivedT &RHS) const
 
bool operator>= (const DerivedT &RHS) const
 
PointerProxy operator-> () const
 
ReferenceProxy operator[] (DifferenceTypeT n) const
 

Public Attributes

decltype(*std::declval< WrappedIteratorT >() operator* )()
 

Friends

bool operator== (const early_inc_iterator_impl &LHS, const early_inc_iterator_impl &RHS)
 

Additional Inherited Members

- Public Types inherited from llvm::iterator_adaptor_base< early_inc_iterator_impl< WrappedIteratorT >, WrappedIteratorT, std::input_iterator_tag >
using difference_type = typename std::iterator_traits< WrappedIteratorT >::difference_type
 
- Public Types inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
using iterator_category = IteratorCategoryT
 
using value_type = T
 
using difference_type = DifferenceTypeT
 
using pointer = PointerT
 
using reference = ReferenceT
 
- Protected Types inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT >
enum  { IsRandomAccess , IsBidirectional }
 
- Protected Member Functions inherited from llvm::iterator_adaptor_base< early_inc_iterator_impl< WrappedIteratorT >, WrappedIteratorT, std::input_iterator_tag >
 iterator_adaptor_base ()=default
 
 iterator_adaptor_base (WrappedIteratorT u)
 
const WrappedIteratorTwrapped () const
 
- Protected Attributes inherited from llvm::iterator_adaptor_base< early_inc_iterator_impl< WrappedIteratorT >, WrappedIteratorT, std::input_iterator_tag >
WrappedIteratorT I
 

Detailed Description

template<typename WrappedIteratorT>
class llvm::early_inc_iterator_impl< WrappedIteratorT >

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

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:

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

Definition at line 600 of file STLExtras.h.

Constructor & Destructor Documentation

◆ early_inc_iterator_impl()

template<typename WrappedIteratorT >
llvm::early_inc_iterator_impl< WrappedIteratorT >::early_inc_iterator_impl ( WrappedIteratorT  I)
inline

Definition at line 613 of file STLExtras.h.

Member Function Documentation

◆ operator++()

Definition at line 625 of file STLExtras.h.

References assert().

Friends And Related Function Documentation

◆ operator==

template<typename WrappedIteratorT >
bool operator== ( const early_inc_iterator_impl< WrappedIteratorT > &  LHS,
const early_inc_iterator_impl< WrappedIteratorT > &  RHS 
)
friend

Definition at line 633 of file STLExtras.h.

Member Data Documentation

◆ operator*

template<typename WrappedIteratorT >
decltype(*std::declval< WrappedIteratorT >() llvm::early_inc_iterator_impl< WrappedIteratorT >::operator*) ()
inline

Definition at line 616 of file STLExtras.h.


The documentation for this class was generated from the following file: