EVMC
|
The filter iterator adaptor creates a view of an iterator range in which some elements of the range are skipped. More...
#include <filter_iterator.hpp>
Public Types | |
using | difference_type = typename std::iterator_traits< BaseIterator >::difference_type |
The iterator difference type. | |
using | value_type = typename std::iterator_traits< BaseIterator >::value_type |
The iterator value type. | |
using | pointer = typename std::iterator_traits< BaseIterator >::pointer |
The iterator pointer type. | |
using | reference = typename std::iterator_traits< BaseIterator >::reference |
The iterator reference type. | |
using | iterator_category = std::input_iterator_tag |
The iterator category. | |
Public Member Functions | |
constexpr | filter_iterator (BaseIterator it, BaseIterator end) noexcept |
The constructor of the base iterator pair. | |
constexpr auto | operator* () noexcept |
The dereference operator. | |
constexpr void | operator++ () noexcept |
The increment operator. | |
constexpr bool | operator== (const filter_iterator &o) const noexcept |
The equality operator. | |
constexpr bool | operator!= (const filter_iterator &o) const noexcept |
The inequality operator. | |
The filter iterator adaptor creates a view of an iterator range in which some elements of the range are skipped.
A predicate function controls which elements are skipped. When the predicate is applied to an element, if it returns true then the element is retained and if it returns false then the element is skipped over. When skipping over elements, it is necessary for the filter adaptor to know when to stop so as to avoid going past the end of the underlying range. A filter iterator is therefore constructed with pair of iterators indicating the range of elements in the unfiltered sequence to be traversed.
Similar to boost::filter_iterator.
Definition at line 34 of file filter_iterator.hpp.
using evmc::filter_iterator< BaseIterator, noexcept >::difference_type = typename std::iterator_traits<BaseIterator>::difference_type |
The iterator difference type.
Definition at line 37 of file filter_iterator.hpp.
using evmc::filter_iterator< BaseIterator, noexcept >::iterator_category = std::input_iterator_tag |
The iterator category.
Definition at line 49 of file filter_iterator.hpp.
using evmc::filter_iterator< BaseIterator, noexcept >::pointer = typename std::iterator_traits<BaseIterator>::pointer |
The iterator pointer type.
Definition at line 43 of file filter_iterator.hpp.
using evmc::filter_iterator< BaseIterator, noexcept >::reference = typename std::iterator_traits<BaseIterator>::reference |
The iterator reference type.
Definition at line 46 of file filter_iterator.hpp.
using evmc::filter_iterator< BaseIterator, noexcept >::value_type = typename std::iterator_traits<BaseIterator>::value_type |
The iterator value type.
Definition at line 40 of file filter_iterator.hpp.
|
inlineconstexprnoexcept |
The constructor of the base iterator pair.
Definition at line 68 of file filter_iterator.hpp.
|
inlineconstexprnoexcept |
The inequality operator.
Definition at line 92 of file filter_iterator.hpp.
|
inlineconstexprnoexcept |
The dereference operator.
Definition at line 74 of file filter_iterator.hpp.
|
inlineconstexprnoexcept |
The increment operator.
Definition at line 82 of file filter_iterator.hpp.
|
inlineconstexprnoexcept |
The equality operator.
Definition at line 89 of file filter_iterator.hpp.