std::ranges...k_view::end(3)
π
std::ranges::chunk_view::end π
okay so this is the C++ Standard Libary page for std::ranges::chunk_view::end(3) β bestie, weβre reading the actual manual together and Iβm keeping every single deet. No cap. π«Ά
π NAME π
std::ranges::chunk_view::end β std::ranges::chunk_view::end
β¨ Synopsis β¨
V models only input_range:
constexpr std::default_sentinel_t end() const noexcept;
(1) (since C++23)
V models forward_range:
constexpr auto end() requires (!__simple_view<V>);
(2) (since C++23)
constexpr auto end() const requires ranges::forward_range<const V>;
(3) (since C++23)
Returns an iterator or a std::default_sentinel that compares equal to the end iterator of the chunk_view.
(1)β Available only ifVmodelsinput_range. Equivalent to:return std::default_sentinel.(2)and(3)β Available ifVmodelsforward_range. Letbase_denote the underlying adapted view,n_denote the stored chunk size, anditeratordenote the nested iterator class.
(2) β Equivalent to:
if constexpr (ranges::common_range<V> && ranges::sized_range<V>)
{
auto missing = (n_ - ranges::distance(base_) % n_) % n_;
return iterator<false>(this, ranges::end(base_), missing);
}
else if constexpr (ranges::common_range<V> &&
!ranges::bidirectional_range<V>)
return iterator<false>(this, ranges::end(base_));
else
return std::default_sentinel;
(3) β Equivalent to:
if constexpr (ranges::common_range<const V> &&
ranges::sized_range<const V>)
{
auto missing = (n_ - ranges::distance(base_) % n_) % n_;
return iterator<true>(this, ranges::end(base_), missing);
}
else if constexpr (ranges::common_range<const V> &&
!ranges::bidirectional_range<const V>)
return iterator<true>(this, ranges::end(base_));
else
return std::default_sentinel;
π Parameters π
(none) β literally none, bestie π«Ά
π Return value π
An iterator or sentinel representing the end of the chunk_view, as described above.
π Example π
bestie, they really left us hanging π the page says:
This section is incomplete
Reason: no example
No example, no cap. Weβre not inventing one.
π₯ See also π₯
beginβ returns an iterator to the beginning β(C++23)β (public member function)ranges::endβ returns a sentinel indicating the end of a range β(C++20)β (customization point object)
π Category π
Category tag, exactly as written: * Todo no example
okay thatβs the whole page, bestie β source/version energy: http://cppreference.com, 2024.06.10, page std::ranges...k_view::end(3). Mwah π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms