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
filter_if
Description

Returns the result type of filter_if given the sequence and unary MPL Lambda Expression predicate type.

Synopsis
template<
    typename Sequence,
    typename Pred
    >
struct filter_if
{
    typedef unspecified type;
};

Table 1.74. Parameter

Parameter

Requirement

Description

Sequence

A model of Forward Sequence

Operation's argument

Pred

A unary MPL Lambda Expression

Type to retain

Expression Semantics
result_of::filter_if<Sequence, Pred>::type

Return type: A model of Forward Sequence.

Semantics: Returns a sequence containing the elements of Sequence for which Pred evaluates to boost::mpl::true_.

Complexity

Constant.

Header
#include <boost/fusion/algorithm/transformation/filter_if.hpp>
#include <boost/fusion/include/filter_if.hpp>

PrevUpHomeNext