|
halcheck 1.0
|
An iterator adaptor that skips elements that do not satisfy user-defined predicate. More...
#include <filter.hpp>
Public Types | |
| using | value_type = lib::iter_value_t<I> |
| The type of value pointed to by this type of iterator. | |
| using | reference = lib::iter_reference_t<I> |
The return type of operator*. | |
| using | pointer = void |
This iterator type does not support operator->. | |
| using | difference_type = lib::iter_difference_t<I> |
The return type of operator-. | |
| using | iterator_category |
| Indicates the level of supported iterator operations this type provides. | |
Public Member Functions | |
| constexpr | filter_iterator ()=default |
| Constructs a default filter_iterator. | |
| filter_iterator (I base, I end, F fun) | |
| Constructs a filter_iterator from a (begin, end] pair of iterators and a predicate. | |
| template<typename I2 , typename F2 > | |
| constexpr | filter_iterator (filter_iterator< I2, F2 > other) |
| Performs a conversion on a filter_iterator with compatible type parameters. | |
| template<typename I2 , typename F2 > | |
| constexpr | filter_iterator (filter_iterator< I2, F2 > other) |
| Performs a conversion on a filter_iterator with compatible type parameters. | |
| constexpr const I & | base () const &noexcept |
| Get a reference to the base iterator of this filter_iterator. | |
| I | base () && |
| Get the base iterator of this filter_iterator. | |
| constexpr reference | operator* () const noexcept(noexcept(*std::declval< const I & >())) |
| Dereferences the base iterator. | |
| filter_iterator & | operator++ () |
| Advances the base iterator to the next element that satisfies the predicate. | |
| template<bool _ = true> | |
| filter_iterator & | operator-- () |
| Advances the base iterator backwards to the previous element that satisfies the predicate. | |
| constexpr lib::iter_reference_t< I > | operator[] (lib::iter_difference_t< I > n) const |
| Access the element at the specified index. | |
| I | operator++ (int) |
| Advances this iterator. | |
| I | operator-- (int) |
| Advances this iterator a step backwards. | |
| I & | operator-= (lib::iter_difference_t< I > n) |
| Advances this iterator the specified number of steps backwards. | |
Friends | |
| constexpr bool | operator== (const filter_iterator &lhs, const filter_iterator &rhs) |
| Compares two filter_iterators for equality. | |
An iterator adaptor that skips elements that do not satisfy user-defined predicate.
| I | The base iterator type. |
| F | The type of predicate. |