std::ranges...ew::iterator(3)
πΈ NAME
okay bestie, welcome to the std::ranges::chunk_view::iterator page from the C++ Standard Libary manual π. The name is std::ranges::chunk_view::iterator, and the name line is also std::ranges::chunk_view::iterator β yes, itβs giving βsame name, no notesβ energy.
β¨ Synopsis
template< bool Const > (since C++23)
class /*iterator*/ (exposition only*)
This /*iterator*/ is the return type of chunk_view::begin, and of chunk_view::end when the underlying view V is a common_range.
Itβs present only if V models forward_range.
The type /*iterator*/<true> is returned by the const-qualified overloads. The type /*iterator*/<false> is returned by the non-const-qualified overloads. const girlies stay winning π
π Member types
Parent(private) βconst chunk_viewifConstistrue, otherwisechunk_view. (exposition-only member type*)Base(private) βconst VifConstistrue, otherwiseV. (exposition-only member type*)iterator_categoryβstd::input_iterator_tagiterator_conceptβ the vibe check is:std::random_access_iterator_tag, ifBasemodelsrandom_access_range. Otherwise,std::bidirectional_iterator_tag, ifBasemodelsbidirectional_range. Otherwise,std::forward_iterator_tag.
value_typeβdecltype(views::take(ranges::subrange(current_, end_), n_));difference_typeβranges::range_difference_t<Base>
π¦ Data members
current_(private) βranges::iterator_t<Base>, holds an iterator to the first element of current chunk in the underlying sequence (i.e. the begin of a chunk). (exposition-only member object*)end_(private) βranges::sentinel_t<Base>, holds a sentinel to the end of the underlying sequence. (exposition-only member object*)n_(private) βranges::range_difference_t<Base>, holds initial number of elements in the chunk (the last chunk can be smaller). (exposition-only member object*)missing_(private) βranges::range_difference_t<Base>, usually equals toranges::advance(current_, n_, end_);. (exposition-only member object*)
π Member functions
constructor(C++23) β constructs an iterator (public member function)base(C++23) β returns an iterator to current element (public member function)operator*(C++23) β accesses the element (public member function)operator[](C++23) β accesses an element by index (public member function)operator++,operator++(int),operator--,operator--(int),operator+=,operator-=(C++23) β advances or decrements the underlying iterator (public member function)
π₯ Non-member functions
operator==,operator<,operator>,operator<=,operator>=,operator<=>(C++23) β compares the underlying iterators (function)operator+,operator-(C++23) β performs iterator arithmetic (function)
π Example
This section is incomplete.
Reason: no example
not me showing up with no example π no cap, thatβs literally what it says.
β References
- C++23 standard (
ISO/IEC 14882:2023): 26.7.28.7Class templatechunk_view::iteratorfor forward ranges[range.chunk.fwd.iter]
π See also
Category:
- Todo no example
π okay thatβs the whole page, bestie! source/version: http://cppreference.com β date: 2024.06.10 β page: std::ranges...ew::iterator(3). periodt β¨
π¦ 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