Namespaces
Variants

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

From cppreference.net
Ranges library
Range adaptors
constexpr auto end ( ) ;
(C++20부터)

센티넬(sentinel) 또는 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);
}

참고 항목

시작 부분에 대한 반복자를 반환합니다
(public member function)