Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function for_each

boost::range_run_storage::for_each — Invokes the specified TernaryFunction for each (value, offset, end_offset) tuple in an InfiniteRangeRunStorage.

Synopsis

// In header: <boost/range_run_storage/algorithm/for_each.hpp>


template<typename In, typename Fun> Fun for_each(In & in, Fun fun);
template<typename In, typename Fun> Fun for_each(In const & in, Fun fun);

Description

Invokes the specified TernaryFunction for each (value, offset, end_offset) tuple in an InfiniteRangeRunStorage. The functor fun is invoked N times, where N is the number of runs in the InfiniteRangeRunStorage.

Parameters:
fun

An TernaryFunction to be invoked with each (value, offset, end_offset) tuple in the sequence.

in

The input InfiniteRangeRunStorage.

Requires:

In is a model of InfiniteRangeRunStorage.

Fun is a model of TernaryFunction.

Returns:

A copy of fun.


PrevUpHomeNext