template <class InputIterator, class UnaryPredicate> typename iterator_traits<InputIterator>::difference_type count_if (InputIterator first, InputIterator last, UnaryPredicate pred);
[first,last) for whichpred is true. | |
[first,last), which contains all the elements betweenfirst andlast, including the element pointed byfirst but not the element pointed bylast.bool. The value returned indicates whether the element is counted by this function.[first,last) for whichpred does not returnfalse. | |
myvector contains 5 odd values. |
[first,last) are accessed (each object is accessed exactly once).