Partager via


count_if (STL/CLR)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at count_if (STL/CLR).

Returns the number of elements in a range whose values match a specified condition.

Syntax

template<class _InIt, class _Pr> inline  
    typename iterator_traits<_InIt>::difference_type  
        count_if(_InIt _First, _InIt _Last, _Pr _Pred);  

Remarks

This function behaves the same as the STL function count_if. For more information, see count_if.

Requirements

Header: <cliext/algorithm>

Namespace: cliext

See Also

algorithm (STL/CLR)