std::ranges...ew::iterator(3)
π NAME π
okay so bestie, welcome to the std::ranges...ew::iterator(3) page from the C++ Standard Libary (that spelling is canon, don't come for me π). The actual name is std::ranges::slide_view::iterator β and the page literally says std::ranges::slide_view::iterator - std::ranges::slide_view::iterator, which is highkey iconic of it.
π¦ Synopsis π¦
template< bool Const > (since C++23)
class /*iterator*/ (exposition only*)
This is the return type of slide_view::begin, and of slide_view::end when the underlying view V is a common_range. no cap, that's the whole vibe.
The type /*iterator*/<true> is returned by the const-qualified overloads. The type /*iterator*/<false> is returned by the non-const-qualified overloads. slay, const correctness π
.
π Member types π
here's the member-type tea, bestie β:
Base (private)βconst VifConstistrue, otherwiseV. (exposition-only member type*)iterator_categoryβstd::input_iterator_tag.iterator_conceptβstd::random_access_iterator_tag, ifBasemodelsrandom_access_range. Otherwise,std::bidirectional_iterator_tag, ifBasemodelsbidirectional_range. Otherwise,std::forward_iterator_tag.
value_typeβdecltype(views::counted(current_, n_)).difference_typeβranges::range_difference_t<Base>.
π§Ί Data members π§Ί
these are the private little data gremlins, and yes they're exposition-only π:
current_(private) βranges::iterator_t<Base>, holds an iterator to the first underlying element of the current window inslide_view(exposition-only member object*).last_ele_(private) (optional) βranges::iterator_t<Base>, holds an iterator to the one-past-end underlying element of the current window inslide_view. Present only ifBasemodels/*slide-caches-first*/. (exposition-only member object*)n_(private) βranges::range_difference_t<Base>, holds the window width ofslide_view. (exposition-only member object*)
β¨ Member functions β¨
constructorβ constructs an iterator (C++23, public member function).operator*β accesses the element (C++23, public member function).operator[]β accesses an element by index (C++23, public member function).operator++,operator++(int),operator--,operator--(int),operator+=,operator-=β advances or decrements the underlying iterators (C++23, public member function).
π Non-member functions π
operator==,operator<,operator>,operator<=,operator>=,operator<=>β compares the underlying iterators (C++23, function).operator+,operator-β performs iterator arithmetic (C++23, function).
π Example π
This section is incomplete Reason: no example.
not me leaving this section empty, but that's literally what the page says π.
π References π
C++23 standard (ISO/IEC 14882:2023):26.7.29.3 Class template slide_view::iterator [range.slide.iterator]
π See also π
Category: * Todo no example
made with π from http://cppreference.com, dated 2024.06.10, page std::ranges...ew::iterator(3) β bye bestie, go iterate responsibly π«Άβ¨
π¦ 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