LLVM  14.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]
Collaboration diagram for llvm::early_inc_iterator_impl< WrappedIteratorT >:
Collaboration 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< early_inc_iterator_impl< WrappedIteratorT >, std::input_iterator_tag, typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::difference_type, 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 >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type * >, 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 & > >
early_inc_iterator_impl< WrappedIteratorToperator+ (typename std::iterator_traits< WrappedIteratorT >::difference_type n) const
 
early_inc_iterator_impl< WrappedIteratorToperator- (typename std::iterator_traits< WrappedIteratorT >::difference_type n) const
 
early_inc_iterator_impl< WrappedIteratorT > & operator++ ()
 
early_inc_iterator_impl< WrappedIteratorToperator++ (int)
 
early_inc_iterator_impl< WrappedIteratorT > & operator-- ()
 
early_inc_iterator_impl< WrappedIteratorToperator-- (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
 
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 >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type * > 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 >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type * > operator-> () const
 
ReferenceProxy operator[] (typename std::iterator_traits< WrappedIteratorT >::difference_type n)
 
ReferenceProxy operator[] (typename std::iterator_traits< WrappedIteratorT >::difference_type 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< early_inc_iterator_impl< WrappedIteratorT >, std::input_iterator_tag, typename std::iterator_traits< WrappedIteratorT >::value_type, typename std::iterator_traits< WrappedIteratorT >::difference_type, 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 >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type * >, 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 & > >
using iterator_category = std::input_iterator_tag
 
using value_type = typename std::iterator_traits< WrappedIteratorT >::value_type
 
using difference_type = typename std::iterator_traits< WrappedIteratorT >::difference_type
 
using pointer = 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 >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type * >
 
using reference = 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 & >
 
- 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, 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 >::pointer, typename std::iterator_traits< WrappedIteratorT >::value_type * >, 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 & > >
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 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 514 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 529 of file STLExtras.h.

Member Function Documentation

◆ operator++()

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

Definition at line 541 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 549 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 532 of file STLExtras.h.


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