std::ranges::split_view<V,Pattern>::end
From cppreference.com
< cpp | ranges | split 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() const;
(since C++20)
Returns an iterator or a sentinel representing the end of the resulting subrange. Equivalent to:
constexpr auto end()
{
if constexpr (ranges::common_range <V>)
return
iterator
{*this, ranges::end (base_
), {}};
else
return
sentinel
{*this};
}
[edit] Return value
[edit] Example
Run this code
#include <cassert> #include <ranges> #include <string_view> int main() { constexpr std::string_view keywords{"bitand bitor bool break"}; std::ranges::split_view kw{keywords, ' '}; assert (4 == std::ranges::distance (kw.begin(), kw.end())); }
[edit] See also
returns an iterator or a sentinel to the end
(public member function of
(public member function of
std::ranges::lazy_split_view<V,Pattern>
) [edit]