## CGAL::Filter_iterator<Iterator, Predicate>

### Definition

The iterator adaptor Filter_iterator<Iterator, Predicate> acts as a filter on a given range. Whenever the iterator is in- or decremented, it ignores all iterators for which the given Predicate is true. The iterator category is the same as for Iterator.

#include <CGAL/iterator.h>

### Requirements

- Iterator is a model for ForwardIterator.
- Predicate is a functor: Iterator bool.

### Creation

Filter_iterator<Iterator, Predicate> i;

Filter_iterator<Iterator, Predicate> i ( | Iterator e, Predicate p, Iterator c = e);

| creates an iterator which filters values according to p. Initializes by taking the first valid iterator (according to p), starting at c, and stopping at e if none is found.