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

From cppreference.com
 
 
Ranges library
Range access
Range conversions
(哋它亢++23)(哋它亢++23)
(哋它亢++23)

Range primitives
(哋它亢++23)(哋它亢++23)    
(哋它亢++23)



Dangling iterator handling
Range concepts
Views

Range factories
(哋它亢++23)(哋它亢++23)
Range adaptors
(哋它亢++23)(哋它亢++23)
(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
(哋它亢++23)(哋它亢++23)
Range generators
(哋它亢++23)
Range adaptor objects
Range adaptor closure objects
(哋它亢++23)
Helper items
(until 哋它亢++23)(哋它亢++23)


 
 
constexpr auto end();
(since 哋它亢++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.

Parameters

(none)

Return value

A sentinel or an iterator representing the end of the view.

Example

#include <array>
#include <iostream>
#include <ranges>
 
int main()
{
    constexpr std::array data{0, -1, -2, 3, 1, 4, 1, 5};
 
    auto view = std::ranges::drop_while_view
    {
        data, [](int x) { return x <= 0; }
    };
 
    for (auto it = view.begin(); it != view.end(); ++it)
        std::cout << *it << ' ';
    std::cout << '\n';
}

Output:

3 1 4 1 5

See also

(哋它亢++20)
returns an iterator to the beginning
(public member function)