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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
for_each
Description

A metafunction returning the result type of applying for_each to a sequence. The return type of for_each is always void.

Synopsis
template<
    typename Sequence,
    typename F
>
struct for_each
{
    typedef void type;
};

Table 1.51. Parameters

Parameter

Requirement

Description

Sequence

A model of Forward Sequence

Operation's argument

F

Any type

Operation's argument


Expression Semantics
result_of::for_each<Sequence, F>::type

Return type: void.

Semantics: Returns the return type of for_each for a sequence of type Sequence and a unary function object F. The return type is always void.

Complexity

Constant.

Header
#include <boost/fusion/algorithm/iteration/for_each.hpp>
#include <boost/fusion/include/for_each.hpp>

PrevUpHomeNext