Namespaces
Variants
Actions

std::ranges::drop_view<V>::end

From cppreference.com
< cpp‎ | ranges‎ | drop view
 
 
Ranges library
 
 
constexpr auto end() requires (!/*simple-view*/<V>);
(1) (since C++20)
constexpr auto end() const requires ranges::range <const V>;
(2) (since C++20)

Returns a sentinel or an iterator representing the end of the drop_view.

[edit] Return value

ranges::end (base_ ).

[edit] Example

Run this code
#include <algorithm>
#include <iostream>
#include <iterator>
#include <ranges>
 
int main()
{
 namespace ranges = std::ranges;
 constexpr char url[]{"https://cppreference.com"};
 
 const auto p = std::distance (ranges::begin (url), ranges::find (url, '/'));
 auto site = ranges::drop_view {url, p + 2}; // drop the prefix "https://"
 
 for (auto it = site.begin(); it != site.end(); ++it)
 std::cout << *it;
 std::cout << '\n';
}

Output:

cppreference.com

[edit] See also

returns an iterator to the beginning
(public member function) [edit]
returns an iterator to the beginning of a range
(customization point object)[edit]
(C++20)
returns a sentinel indicating the end of a range
(customization point object)[edit]
Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/drop_view/end&oldid=181230"

AltStyle によって変換されたページ (->オリジナル) /