Namespaces
Variants
Actions

std::ranges::chunk_view<V>::begin

From cppreference.com
< cpp‎ | ranges‎ | chunk view
 
 
Ranges library
Range adaptors
 
std::ranges::chunk_view
Member functions
chunk_view::begin
Classes for input_ranges
Deduction guides
outer-iterator
outer-iterator::value_type
inner-iterator
 
V models only input_range
constexpr/*outer_iterator*/ begin();
(1) (since C++23)
V models forward_range
constexprauto begin() requires (!/*simple_view*/<V>);
(2) (since C++23)
constexprauto begin()const requires ranges::forward_range<const V>;
(3) (since C++23)

Returns an iterator to the first element of the chunk_view.

1) Available only if V models input_range. Equivalent to

current_ =ranges::begin(base_);
remainder_ = n_;
return outer_iterator(*this);

2) Available if V models forward_range. Equivalent to return iterator<false>(this, ranges::begin(base_));.
3) Available if V models forward_range. Equivalent to return iterator<true>(this, ranges::begin(base_));.

[edit]Return value

An iterator to the first element of the chunk_view, as described above.

[edit]Example

[edit]See also

returns an iterator or a sentinel to the end
(public member function)[edit]
returns an iterator to the beginning of a range
(customization point object)[edit]
close