filter_iterator_abstract.rst 817 B

123456789101112131415
  1. .. Copyright David Abrahams 2006. Distributed under the Boost
  2. .. Software License, Version 1.0. (See accompanying
  3. .. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. The filter iterator adaptor creates a view of an iterator range in
  5. which some elements of the range are skipped. A predicate function
  6. object controls which elements are skipped. When the predicate is
  7. applied to an element, if it returns ``true`` then the element is
  8. retained and if it returns ``false`` then the element is skipped
  9. over. When skipping over elements, it is necessary for the filter
  10. adaptor to know when to stop so as to avoid going past the end of the
  11. underlying range. A filter iterator is therefore constructed with pair
  12. of iterators indicating the range of elements in the unfiltered
  13. sequence to be traversed.