std::experimental::ranges:: count, std::experimental::ranges:: count_if
|
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 回の述語の比較/適用、および同数の射影の適用が行われます。 注記
範囲内の要素数について、
実装例
例
関連項目
|