123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef BOOST_ALGORITHM_FOR_EACH_N_HPP
- #define BOOST_ALGORITHM_FOR_EACH_N_HPP
- #include <utility>
- #include <boost/config.hpp>
- namespace boost { namespace algorithm {
- template<class InputIterator, class Size, class Function>
- InputIterator for_each_n(InputIterator first, Size n, Function f)
- {
- for ( ; n > 0; --n, ++first )
- f(*first);
- return first;
- }
- }}
- #endif
|