Utility functions wrapping STL algorithms and additional algorithms. More...
Functions | |
template<class Container , class UnaryPredicate > | |
decltype(auto) | all_of (const Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::all_of. | |
template<class Container , class UnaryPredicate > | |
decltype(auto) | any_of (const Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::any_of. | |
template<class Container , class UnaryPredicate > | |
decltype(auto) | none_of (const Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::none_of. | |
template<class Container , class T > | |
decltype(auto) | count (const Container &c, const T &value) |
Convenience wrapper around std::count. | |
template<class Container , class UnaryPredicate > | |
decltype(auto) | count_if (const Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::count_if. | |
template<class Container , class T > | |
decltype(auto) | find (const Container &c, const T &value) |
Convenience wrapper around std::find. | |
template<class Container , class UnaryPredicate > | |
decltype(auto) | find_if (const Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::find_if. | |
template<class Container , class UnaryPredicate > | |
decltype(auto) | find_if_not (const Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::find_if_not. | |
template<class Container , class T > | |
bool | found (const Container &c, const T &value) |
Convenience wrapper around std::find, returns true if value is in c . | |
template<class Container , class UnaryPredicate > | |
bool | found_if (const Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::find_if, returns true if the result of std::find_if is not equal to end(c) . | |
template<class Container , class UnaryPredicate > | |
bool | found_if_not (const Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::find_if_not, returns true if the result of std::find_if_not is not equal to end(c) . | |
template<class Container , class UnaryFunction > | |
decltype(auto) | for_each (const Container &c, UnaryFunction &&f) |
Convenience wrapper around std::for_each, returns the result of std::for_each(begin(c), end(c), f) . | |
template<class Container , class Container2 > | |
decltype(auto) | equal (const Container &lhs, const Container2 &rhs) |
Convenience wrapper around std::equal, assumes containers lhs has at least as many elements as rhs . | |
template<class Container , class Container2 , class BinaryPredicate > | |
decltype(auto) | equal (const Container &lhs, const Container2 &rhs, BinaryPredicate &&p) |
Convenience wrapper around std::equal, assumes containers lhs has at least as many elements as rhs . | |
template<class Container > | |
decltype(auto) | max_element (const Container &c) |
Convenience wrapper around std::max_element. | |
template<class Container , class Compare > | |
decltype(auto) | max_element (const Container &c, Compare &&comp) |
Convenience wrapper around std::max_element. | |
template<class Container > | |
decltype(auto) | min_element (const Container &c) |
Convenience wrapper around std::min_element. | |
template<class Container , class Compare > | |
decltype(auto) | min_element (const Container &c, Compare &&comp) |
Convenience wrapper around std::min_element. | |
template<class Container , class T > | |
decltype(auto) | remove (Container &c, const T &value) |
Convenience wrapper around std::remove. | |
template<class Container , class UnaryPredicate > | |
decltype(auto) | remove_if (Container &c, UnaryPredicate &&unary_predicate) |
Convenience wrapper around std::remove_if. | |
template<class Container , class T > | |
decltype(auto) constexpr | iota (Container &&c, T value) |
template<class Container , class T > | |
decltype(auto) | accumulate (const Container &c, T init) |
Convenience wrapper around std::accumulate, returns std::accumulate(begin(c), end(c), init) . | |
template<class Container , class T , class BinaryFunction > | |
decltype(auto) | accumulate (const Container &c, T init, BinaryFunction &&f) |
Convenience wrapper around std::accumulate, returns std::accumulate(begin(c), end(c), init, f) . | |
Utility functions wrapping STL algorithms and additional algorithms.