名前空間
変種
操作

std::ranges::drop_while_view<V,Pred>::end

From cppreference.com
 
 
Rangesライブラリ
Rangeアダプタ
 
 
constexpr auto end();
(C++20以降)

drop_while_viewの終端を表すセンチネルまたはイテレータを返します。

実質的に、base_(基になるビュー)に対してranges::end(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);
}

[編集] 関連項目

先頭へのイテレータを返す
(public メンバ関数) [編集]
English 日本語 中文(简体) 中文(繁體)