std::ranges...w::iterator(3)
πΈ NAME πΈ
std::ranges::adjacent_view::iterator β std::ranges::adjacent_view::iterator. Yep bestie, the NAME section says it twice and we're keeping both, no erasure π
. This page is std::ranges...w::iterator(3) from the C++ Standard Libary (that's the manual name, typo and all, and I said what I said).
β¨ Synopsis β¨
template< bool Const > (since C++23)
class /*iterator*/ (exposition only*)
Okay so this is the return type of adjacent_view::begin, and also of adjacent_view::end when the underlying view V is a common_range. Main character behavior fr fr.
The type /*iterator*/<true> is returned by the const-qualified overloads. The type /*iterator*/<false> is returned by the non-const-qualified overloads. Both versions are valid and iconic π«Ά.
π Member types π
Here's the whole member-type lineup, no skipping:
Base(private) βconst VifConstistrue, otherwiseV. (exposition-only member type*)iterator_categoryβstd::input_iterator_tagstd::random_access_iterator_tag, ifBasemodelsrandom_access_range. Otherwise,
iterator_conceptβstd::bidirectional_iterator_tag, ifBasemodelsbidirectional_range. Otherwise,std::forward_iterator_tag.
value_typeβstd::tuple</*REPEAT*/(ranges::range_value_t<Base>, N)...>;difference_typeβranges::range_difference_t<Base>
π Data members π
current_(private) βstd::array<ranges::iterator_t<Base>, N>. (exposition-only member object*)
π Member functions π
constructor(C++23) β constructs an iterator (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-=β advances or decrements the underlying iterators (public member function). The original drops a(C++23)marker right afteroperator-=, so that's here too π«‘.
π₯ Non-member functions π₯
operator==,operator<,operator>,operator<=,operator>=β compares the underlying iterators (function)operator<=>(C++23) β compares the underlying iterators (function)operator+,operator-(C++23) β performs iterator arithmetic (function)iter_move(C++23) β casts the result of dereferencing the underlying iterator to its associated rvalue reference type (function)iter_swap(C++23) β swaps the objects pointed to by two underlying iterators (function)
π¦ Example π¦
This section is incomplete.
Reason: no example π
π References π
- C++23 standard (
ISO/IEC 14882:2023): 26.7.25.3Class templateadjacent_view::iterator[range.adjacent.iterator]
πΈ See also πΈ
Category:
- Todo no example
And that's the whole page, bestie! Footer source/version and date: http://cppreference.com Β· 2024.06.10 Β· std::ranges...w::iterator(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