12#ifndef ZYPP_CORE_NG_BASE_ITERATORS_H_INCLUDED
13#define ZYPP_CORE_NG_BASE_ITERATORS_H_INCLUDED
38 template<
class Pred,
class Base>
42 using value_type =
typename std::iterator_traits<Base>::value_type;
44 using pointer =
typename std::iterator_traits<Base>::pointer;
45 using reference =
typename std::iterator_traits<Base>::reference;
89 return !(*
this == other);
115 template<
class Pred,
class Base>
A simple forward iterator that filters a base range according to a predicate.
sat::detail::SolvableIterator _end
Base const & base() const
Returns the underlying base iterator at its current position.
std::forward_iterator_tag iterator_category
sat::detail::SolvableIterator _it
bool operator==(const FilterIterator &other) const
Equality comparison.
FilterIterator()=default
Default constructor.
bool operator!=(const FilterIterator &other) const
Inequality comparison.
void satisfy_predicate()
Advances the internal iterator until the predicate is met or _end is reached.
reference operator*() const
Dereference operator.
typename std::iterator_traits< sat::detail::SolvableIterator >::value_type value_type
FilterIterator & operator++()
Pre-increment operator.
typename std::iterator_traits< sat::detail::SolvableIterator >::reference reference
FilterIterator(Pred p, Base it, Base end)
Constructs a FilterIterator.
detail::ByRepository _pred
pointer operator->() const
Arrow operator.
typename std::iterator_traits< sat::detail::SolvableIterator >::pointer pointer
typename std::iterator_traits< sat::detail::SolvableIterator >::difference_type difference_type
FilterIterator operator++(int)
Post-increment operator.
FilterIterator< Pred, Base > make_filter_iterator(Pred p, Base it, Base end)
Helper function to deduce types and construct a FilterIterator.