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

Returns the result type of find_if given the sequence and predicate types.

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

Table 1.63. Parameters

Parameter

Requirement

Description

Sequence

A model of Forward Sequence

Operation's argument

Pred

A model of MPL Lambda Expression

Operation's arguments


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

Return type: A model of the same iterator category as the iterators of Sequence.

Semantics: Returns an iterator to the first element in Sequence for which Pred evaluates to true. Returns result_of::end<Sequence>::type if there is no such element.

Complexity

Linear. At most result_of::size<Sequence>::value comparisons.

Header
#include <boost/fusion/algorithm/query/find_if.hpp>
#include <boost/fusion/include/find_if.hpp>

PrevUpHomeNext