std::ranges::drop_while_view<V,Pred>::end
ja.cppreference.net から
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); }
関連項目
|
先頭を指すイテレータを返す
(公開メンバ関数) |