std::experimental::ranges:: find, std::experimental::ranges:: find_if, std::experimental::ranges:: find_if_not
|
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) |
|
template
<
InputIterator I, Sentinel
<
I
>
S,
class
Proj
=
ranges::
identity
,
IndirectUnaryPredicate
<
projected
<
I, Proj
>>
Pred
>
|
(5) | (ranges TS) |
|
template
<
InputRange R,
class
Proj
=
ranges::
identity
,
IndirectUnaryPredicate
<
projected
<
ranges::
iterator_t
<
R
>
, Proj
>>
Pred
>
|
(6) | (ranges TS) |
範囲
[
first
,
last
)
内で特定の条件を満たす最初の要素を返します:
find_if
は、射影された値に対して述語
p
が
true
を返す要素を検索します(つまり、
ranges::
invoke
(
pred,
ranges::
invoke
(
proj,
*
i
)
)
が
true
の場合)。
find_if_not
は、射影された値に対して述語
q
が
false
を返す要素を検索する(つまり、
ranges::
invoke
(
pred,
ranges::
invoke
(
proj,
*
i
)
)
が
false
となる要素)。
上記に示された宣言にかかわらず、アルゴリズム宣言の実際のテンプレートパラメータの数と順序は未規定です。したがって、アルゴリズムを呼び出す際に明示的なテンプレート引数を使用する場合、プログラムはおそらく移植性がありません。
目次パラメータ
戻り値条件を満たす最初の要素へのイテレータ。そのような要素が見つからない場合は、 last と等価なイテレータを返します。 計算量最大で last - first 回の述語と射影の適用。 実装例
例
関連項目
|