LLVM 20.0.0git
|
An iterator adaptor that filters the elements of given inner iterators. More...
#include "llvm/ADT/STLExtras.h"
Protected Member Functions | |
void | findNextValid () |
filter_iterator_base ()=default | |
filter_iterator_base (WrappedIteratorT Begin, WrappedIteratorT End, PredicateT Pred) | |
Protected Member Functions inherited from llvm::iterator_adaptor_base< filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >, WrappedIteratorT, std::common_type_t< IterTag, std::iterator_traits< WrappedIteratorT >::iterator_category > > | |
iterator_adaptor_base ()=default | |
iterator_adaptor_base (WrappedIteratorT u) | |
const WrappedIteratorT & | wrapped () const |
Protected Attributes | |
WrappedIteratorT | End |
PredicateT | Pred |
Protected Attributes inherited from llvm::iterator_adaptor_base< filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >, WrappedIteratorT, std::common_type_t< IterTag, std::iterator_traits< WrappedIteratorT >::iterator_category > > | |
WrappedIteratorT | I |
Additional Inherited Members | |
Public Types inherited from llvm::iterator_adaptor_base< filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >, WrappedIteratorT, std::common_type_t< IterTag, std::iterator_traits< WrappedIteratorT >::iterator_category > > | |
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 } |
An iterator adaptor that filters the elements of given inner iterators.
The predicate parameter should be a callable object that accepts the wrapped iterator's reference type and returns a bool. When incrementing or decrementing the iterator, it will call the predicate on each element and skip any where it returns false.
Note: filter_iterator_base implements support for forward iteration. filter_iterator_impl exists to provide support for bidirectional iteration, conditional on whether the wrapped iterator supports it.
Definition at line 444 of file STLExtras.h.
|
protecteddefault |
|
inlineprotected |
Definition at line 467 of file STLExtras.h.
References llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::findNextValid().
|
inlineprotected |
Definition at line 457 of file STLExtras.h.
References llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::End, and llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::Pred.
Referenced by llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::filter_iterator_base(), and llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::operator++().
|
inline |
Definition at line 482 of file STLExtras.h.
References assert(), and llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::End.
|
inline |
Definition at line 476 of file STLExtras.h.
References llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::findNextValid().
|
inline |
Definition at line 487 of file STLExtras.h.
References assert(), and llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::End.
|
protected |
Definition at line 454 of file STLExtras.h.
Referenced by llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::findNextValid(), llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::operator*(), and llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::operator->().
|
protected |
Definition at line 455 of file STLExtras.h.
Referenced by llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >::findNextValid().