...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A metafunction that returns the result type of count_if
given the sequence and predicate types.
template< typename Sequence, typename Pred > struct count_if { typedef int type; };
Table 1.65. Parameters
Parameter |
Requirement |
Description |
---|---|---|
|
A model of Forward Sequence |
Operation's argument |
|
A unary function object |
Operation's argument |
result_of::count_if
<Sequence, Pred>::type
Return type: int
.
Semantics: Returns the return type of
count_if
. The return type is
always int
.
Constant.
#include <boost/fusion/algorithm/query/count_if.hpp> #include <boost/fusion/include/count_if.hpp>