| Home | Libraries | People | FAQ | More

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

Table 1.52. 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>
    #include <boost/fusion/include/count_if.hpp>