std::ranges::zip_view<Views...>::end
constexpr auto end() requires (!(/*simple-view*/<Views> && ...); |
(1) | (since C++23) |
constexpr auto end() const requires (ranges::range<const Views> && ...); |
(2) | (since C++23) |
Returns a sentinel or an iterator representing the end of the std::zip_view
.
1) If
/*zip-is-common*/<Views...>
evaluates to
false
, equivalent to
return /*sentinel*/<false>(/*tuple-transform*/(ranges::end, views_));
.
Otherwise, if
(ranges::random_access_range<Views> && ...)
evaluates to
true
, equivalent to
return begin() + std::iter_difference_t</*iterator*/<false>>(size());
.
Otherwise, equivalent to
return /*iterator*/<false>(/*tuple-transform*/(ranges::end, views_));
.
2) If
/*zip-is-common*/<const Views...>
evaluates to
false
, equivalent to
return /*sentinel*/<true>(/*tuple-transform*/(ranges::end, views_));
.
Otherwise, if
ranges::random_access_range<const Views> && ...
evaluates to
true
, equivalent to
return begin() + std::iter_difference_t</*iterator*/<true>>(size());
.
Otherwise, equivalent to
return /*iterator*/<true>(/*tuple-transform*/(ranges::end, views_));
.
Parameters
(none).
Return value
Iterator to the first element.
Notes
ranges::range<const ranges::zip_view<Views...>>
is modeled if and only if for every type Vi
in Views...
, const Vi
models range
.
Example
See also
(C++23)
|
returns an iterator to the beginning (public member function) |
(C++20)
|
returns a sentinel indicating the end of a range (customization point object) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/ranges/zip_view/end