10 #ifndef SRC_INCLUDE_ALGORITHMS_H_
11 #define SRC_INCLUDE_ALGORITHMS_H_
52 template <
typename Iterator>
54 Iterator begin,
const Iterator &end,
55 typename std::iterator_traits<Iterator>::value_type length) {
56 bool had_to_wrap =
false;
57 for (; begin != end; ++begin) {
62 }
else if (x >= length) {
79 template <
typename Container,
typename UnaryPredicate>
80 inline bool all_of(Container &&c, UnaryPredicate &&
p) {
82 std::forward<UnaryPredicate>(
p));
95 template <
typename Container,
typename UnaryFunction>
96 inline UnaryFunction
for_each(Container &&c, UnaryFunction &&f) {
98 std::forward<UnaryFunction>(f));
103 #endif // SRC_INCLUDE_ALGORITHMS_H_