The documentation for boost range states that count_if can be
expressed as count using a filtered adaptor and then goes on to say
that no algorithm needs the _if suffix. I'm having trouble seeing
how that is the case. Here is the relevant section from the latest
(1.49 beta) documentation.
What this means is that no
algorithm with the _if suffix is needed.
First of all, what is "out"? I think this is supposed to be "value"
as count requires the value to compare against for the count. But,
since it does require the value, this makes the function
fundamentally different than count_if which will only count the
values that match the predicate. As far as I can tell, this means
that "count" will filter values both by the predicate and by the
value.
What am I missing? How can count_if be properly expressed as count.
To me it seems like it can't.