LLVM  10.0.0svn
Public Member Functions | Protected Attributes | 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]
Collaboration diagram for llvm::early_inc_iterator_impl< WrappedIteratorT >:
Collaboration graph
[legend]

Public Member Functions

 early_inc_iterator_impl (WrappedIteratorT I)
 
BaseT::reference operator* ()
 
early_inc_iterator_imploperator++ ()
 
bool operator== (const early_inc_iterator_impl &RHS) const
 
- 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-- ()
 
bool operator== (const early_inc_iterator_impl< WrappedIteratorT > &RHS) const
 
bool operator< (const early_inc_iterator_impl< WrappedIteratorT > &RHS) const
 
typename std::conditional< 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 & >::type operator* () const
 
- Public Member Functions inherited from llvm::iterator_facade_base< early_inc_iterator_impl< WrappedIteratorT >, std::input_iterator_tag, typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::difference_type, typename std::conditional< std::is_same< typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::value_type >::value, typename std::iterator_traits< WrappedIteratorT >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type * >::type, typename std::conditional< 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 & >::type >
early_inc_iterator_impl< WrappedIteratorT > operator+ (typename std::iterator_traits< WrappedIteratorT >::difference_type n) const
 
early_inc_iterator_impl< WrappedIteratorT > operator- (typename std::iterator_traits< WrappedIteratorT >::difference_type n) const
 
early_inc_iterator_impl< WrappedIteratorT > & operator++ ()
 
early_inc_iterator_impl< WrappedIteratorT > operator++ (int)
 
early_inc_iterator_impl< WrappedIteratorT > & operator-- ()
 
early_inc_iterator_impl< WrappedIteratorT > operator-- (int)
 
bool operator!= (const early_inc_iterator_impl< WrappedIteratorT > &RHS) const
 
bool operator> (const early_inc_iterator_impl< WrappedIteratorT > &RHS) const
 
bool operator<= (const early_inc_iterator_impl< WrappedIteratorT > &RHS) const
 
bool operator>= (const early_inc_iterator_impl< WrappedIteratorT > &RHS) const
 
typename std::conditional< std::is_same< typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::value_type >::value, typename std::iterator_traits< WrappedIteratorT >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type *>::type operator-> ()
 
typename std::conditional< std::is_same< typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::value_type >::value, typename std::iterator_traits< WrappedIteratorT >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type *>::type operator-> () const
 
ReferenceProxy operator[] (typename std::iterator_traits< WrappedIteratorT >::difference_type n)
 
ReferenceProxy operator[] (typename std::iterator_traits< WrappedIteratorT >::difference_type n) const
 

Protected Attributes

bool IsEarlyIncremented = false
 
- Protected Attributes inherited from llvm::iterator_adaptor_base< early_inc_iterator_impl< WrappedIteratorT >, WrappedIteratorT, std::input_iterator_tag >
WrappedIteratorT I
 

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
 
- Protected Types inherited from llvm::iterator_facade_base< early_inc_iterator_impl< WrappedIteratorT >, std::input_iterator_tag, typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::difference_type, typename std::conditional< std::is_same< typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::value_type >::value, typename std::iterator_traits< WrappedIteratorT >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type * >::type, typename std::conditional< 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 & >::type >
enum  
 
- 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 WrappedIteratorT & wrapped () const
 

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 450 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 465 of file STLExtras.h.

Member Function Documentation

◆ operator*()

template<typename WrappedIteratorT >
BaseT::reference llvm::early_inc_iterator_impl< WrappedIteratorT >::operator* ( )
inline

Definition at line 468 of file STLExtras.h.

References assert(), and I.

◆ operator++()

template<typename WrappedIteratorT >
early_inc_iterator_impl& llvm::early_inc_iterator_impl< WrappedIteratorT >::operator++ ( )
inline

Definition at line 477 of file STLExtras.h.

References assert().

◆ operator==()

template<typename WrappedIteratorT >
bool llvm::early_inc_iterator_impl< WrappedIteratorT >::operator== ( const early_inc_iterator_impl< WrappedIteratorT > &  RHS) const
inline

Definition at line 486 of file STLExtras.h.

References assert(), and operator==().

Member Data Documentation

◆ IsEarlyIncremented

template<typename WrappedIteratorT >
bool llvm::early_inc_iterator_impl< WrappedIteratorT >::IsEarlyIncremented = false
protected

Definition at line 461 of file STLExtras.h.


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