...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::algorithm::for_each_n
// In header: <boost/algorithm/cxx17/for_each_n.hpp> template<typename InputIterator, typename Size, typename Function> InputIterator for_each_n(InputIterator first, Size n, Function f);