std::ranges::drop_while_view<V,Pred>::end
cppreference.net에서
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) |