std::ranges::chunk_by_view<V,Pred>::begin
From cppreference.com
< cpp | ranges | chunk by 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)
std::ranges::chunk_by_view
chunk_by_view::begin
constexpr /*iterator*/ begin();
(since C++23)
Returns an iterator to the first element of the chunk_by_view
.
Equivalent to:
ranges::iterator_t <V> iter; if (begin_.has_value()) iter = begin_.value(); else { iter = /*find_next*/(ranges::begin (base())); begin_ = iter; // caching } return /*iterator*/(*this, ranges::begin (base()), iter);
The behavior is undefined if the underlying predicate pred_
does not contain a value.
Contents
[edit] Parameters
(none)
[edit] Return value
Iterator to the first element.
[edit] Notes
In order to provide the amortized constant-time complexity required by the range
concept, this function caches the result within the data member begin_
for use on subsequent calls.
[edit] Example
This section is incomplete
Reason: no example
Reason: no example