12#ifndef ZYPP_BASE_ALGORITHM_H
13#define ZYPP_BASE_ALGORITHM_H
29 template <
class TIterator,
class TFilter,
class TFunction>
55 template <
class TIterator,
class TFunction>
69 template <
class Container,
class Elem>
72 return ( std::find(
c.begin(),
c.end(),
elem ) !=
c.end() );
75 template <
class Container,
class Fnc >
78 return std::any_of(
c.begin(),
c.end(), std::forward<Fnc>(
cb) );
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Easy-to use interface to the ZYPP dependency resolver.
bool any_of(const Container &c, Fnc &&cb)
bool contains(const Container &c, const Elem &elem)
int invokeOnEach(TIterator begin_r, TIterator end_r, TFilter filter_r, TFunction fnc_r)
Iterate through [begin_r,end_r) and invoke fnc_r on each item that passes filter_r.