std::ranges::drop_while_view<V,Pred>::end
From cppreference.com
< cpp | ranges | drop while view
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Ranges library
(C++23)(C++23)
(C++26)(C++26)
(C++23)(C++23)
(C++26)(C++26)
(C++26)(C++26)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)
(C++23)(C++23)
(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
(C++23)(C++23)
constexpr auto end();
(since C++20)
Returns a sentinel or an iterator representing the end of the drop_while_view
.
Effectively returns ranges::end (base_), where base_
is the underlying view.
Contents
[edit] Parameters
(none)
[edit] Return value
A sentinel or an iterator representing the end of the view.
[edit] Example
Run this code
#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); }