LLVM 22.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 | |
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 |
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 433 of file STLExtras.h.
|
protecteddefault |
Referenced by operator++().
|
inlineprotected |
Definition at line 456 of file STLExtras.h.
References End, findNextValid(), and Pred.
|
inlineprotected |
Definition at line 446 of file STLExtras.h.
Referenced by filter_iterator_base(), and operator++().
|
inline |
Definition at line 471 of file STLExtras.h.
|
inline |
Definition at line 465 of file STLExtras.h.
References filter_iterator_base(), and findNextValid().
|
inline |
Definition at line 476 of file STLExtras.h.
|
protected |
Definition at line 443 of file STLExtras.h.
Referenced by filter_iterator_base(), findNextValid(), operator*(), and operator->().
|
protected |
Definition at line 444 of file STLExtras.h.
Referenced by filter_iterator_base(), and findNextValid().