LLVM: llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag (original) (raw)
template<typename WrappedIteratorT, typename PredicateT, typename IterTag>
class llvm::filter_iterator_base< WrappedIteratorT, PredicateT, IterTag >
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.
int A[] = { 1, 2, 3, 4 };
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
iterator_range< filter_iterator< detail::IterOfRange< RangeT >, PredicateT > > make_filter_range(RangeT &&Range, PredicateT Pred)
Convenience function that takes a range of elements and a predicate, and return a new filter_iterator...
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 431 of file STLExtras.h.