std::ranges::drop_view<V>::end
From cppreference.com
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() 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