std::ranges::drop_while_view<V,Pred>:: end
From cppreference.net
<
cpp
|
ranges
|
drop while view
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
|
constexpr
auto
end
(
)
;
|
(C++20以降) | |
drop_while_view
の終端を表すセンチネルまたはイテレータを返します。
実質的に
ranges::
end
(
base_
)
を返します。ここで
base_
は基盤となるビューです。
目次 |
パラメータ
(なし)
戻り値
ビューの終端を表すセンチネルまたはイテレータ。
例
このコードを実行
#include <cassert> #include <iostream> #include <ranges> int main() { static constexpr auto data = {0, -1, -2, 3, 1, 4, 1, 5}; auto view = std::ranges::drop_while_view{data, [](int x) { return x <= 0; }}; assert(view.end()[-1] == 5); }
関連項目
|
先頭を指すイテレータを返す
(公開メンバ関数) |