Boost C++ Libraries Home Libraries People FAQ More

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;
};

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>
Copyright © 2001-2005 Joel de Guzman, Dan Marsden

PrevUpHomeNext