TermOx
Public Types | Public Member Functions | List of all members
ox::Filter_iterator< Iter, Iter_end, F > Class Template Reference

operator++ skips underlying elements of it that do not satisfy predicate. More...

#include <filter_iterator.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = typename Iter::value_type
 
using difference_type = typename Iter::difference_type
 
using pointer = typename Iter::pointer
 
using reference = typename Iter::reference
 

Public Member Functions

 Filter_iterator (Iter const it, Iter_end const end, F &&predicate)
 Pass in the iterator to begin at, end iter, and predicate to test with. More...
 
auto operator++ () -> Filter_iterator &
 
auto operator++ (int) -> Filter_iterator
 
auto operator* () const -> auto &
 
auto operator== (Filter_iterator const &other) const -> bool
 
auto operator!= (Filter_iterator const &other) const -> bool
 
template<typename T >
auto operator== (T const &other) const -> bool
 
template<typename T >
auto operator!= (T const &other) const -> bool
 

Detailed Description

template<typename Iter, typename Iter_end, typename F>
class ox::Filter_iterator< Iter, Iter_end, F >

operator++ skips underlying elements of it that do not satisfy predicate.

Constructor & Destructor Documentation

◆ Filter_iterator()

template<typename Iter , typename Iter_end , typename F >
ox::Filter_iterator< Iter, Iter_end, F >::Filter_iterator ( Iter const  it,
Iter_end const  end,
F &&  predicate 
)
inline

Pass in the iterator to begin at, end iter, and predicate to test with.

This increments it until the end or predicate is true.


The documentation for this class was generated from the following file: