Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Function template for_each
PrevUpHomeNext

Function template for_each

boost::container::for_each

Synopsis

// In header: <boost/container/hub.hpp>


template<typename T, typename Allocator, typename F> 
  F for_each(const hub< T, Allocator > & x, F f);

Description

Effects: Applies f to every element of x. Equivalent to for_each(x.cbegin(), x.cend(), std::ref(f)).

Returns: std::move(f).

Note: Potentially faster than range iteration thanks to internal unrolling and prefetching.


PrevUpHomeNext