Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
count_if
Description

A metafunction that returns the result type of count_if given the sequence and predicate types.

Synopsis
template<
    typename Sequence,
    typename Pred
    >
struct count_if
{
    typedef int type;
};

Parameters

Parameter Requirement Description
Sequence A model of Forward Sequence Operation's argument
Pred A unary function object Operation's argument
Expression Semantics
result_of::count_if<Sequence, Pred>::type

Return type: int.

Semantics: Returns the return type of count_if. The return type is always int.

Complexity

Constant.

Header
#include <boost/fusion/algorithm/query/count_if.hpp>
Copyright © 2001-2005 Joel de Guzman, Dan Marsden

PrevUpHomeNext