std::experimental::ranges:: count, std::experimental::ranges:: count_if
|
헤더에 정의됨
<experimental/ranges/algorithm>
|
||
|
template
<
InputIterator I, Sentinel
<
I
>
S,
class
T,
class
Proj
=
ranges::
identity
>
requires IndirectRelation
<
ranges::
equal_to
<>
,
projected
<
I, Proj
>
,
const
T
*
>
|
(1) | (ranges TS) |
|
template
<
InputRange R,
class
T,
class
Proj
=
ranges::
identity
>
requires IndirectRelation
<
ranges::
equal_to
<>
,
|
(2) | (ranges TS) |
|
template
<
InputIterator I, Sentinel
<
I
>
S,
class
Proj
=
ranges::
identity
,
IndirectUnaryPredicate
<
projected
<
I, Proj
>>
Pred
>
|
(3) | (ranges TS) |
|
template
<
InputRange R,
class
Proj
=
ranges::
identity
,
IndirectUnaryPredicate
<
projected
<
ranges::
iterator_t
<
R
>
, Proj
>>
Pred
>
|
(4) | (ranges TS) |
지정된 기준을 만족하는 범위
[
first
,
last
)
내의 요소 개수를 반환합니다.
위에 설명된 선언들과는 별개로, 알고리즘 선언에 대한 실제 템플릿 매개변수의 개수와 순서는 명시되지 않습니다. 따라서 알고리즘을 호출할 때 명시적 템플릿 인수를 사용하는 경우, 해당 프로그램은 이식성이 없을 가능성이 높습니다.
목차매개변수
반환값조건을 만족하는 요소의 개수. 복잡도정확히 last - first 번의 술어 비교/적용과 동일한 횟수의 프로젝션 적용이 수행됩니다. 참고 사항
범위 내 요소의 개수에 대해
가능한 구현
예제
참고
|