std::ranges...w::iterator(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

✨ std::ranges::stride_view::iterator (3) ✨

okay so this is the std::ranges::stride_view::iterator page from the C++ Standard Libary manual, section 3 β€” yes bestie, Libary, we keep it iconic. πŸ’…


🌸 NAME 🌸

std::ranges::stride_view::iterator β€” std::ranges::stride_view::iterator. Literally the name is the name, no cap. πŸŽ€

✨ Synopsis ✨

Here's the signature, and it is giving template energy:

template< bool Const >  (since C++23)
class /*iterator*/      (exposition only*)

The return type of stride_view::begin, and of stride_view::end when the underlying view V is a common_range.

The type /*iterator*/<true> is returned by the const-qualified overloads. The type /*iterator*/<false> is returned by the non-const-qualified overloads.

🧚 Member types 🧚

  • Parent (private) β€” const ranges::stride_view if Const is true, otherwise ranges::stride_view. (exposition-only member type*)
  • Base (private) β€” const V if Const is true, otherwise V. (exposition-only member type*)
  • difference_type β€” ranges::range_difference_t<Base>
  • value_type β€” ranges::range_value_t<Base>
  • iterator_concept β€” the whole vibe check is:
    • std::random_access_iterator_tag, if Base models random_access_range. Otherwise,
    • std::bidirectional_iterator_tag, if Base models bidirectional_range. Otherwise,
    • std::forward_iterator_tag, if Base models forward_range. Otherwise,
    • std::input_iterator_tag.

Defined if and only if Base models forward_range.

  • iterator_category β€” let C denote the type iterator_traits<iterator_t<Base>>::iterator_category. Then:
    • std::random_access_iterator_tag, if C models std::derived_from<std::random_access_iterator_tag>. Otherwise,
    • C.

πŸŽ€ Data members πŸŽ€

  • current_ (private) β€” ranges::iterator_t<Base>, holds an iterator to the current element. (exposition-only member object*)
  • end_ (private) β€” ranges::sentinel_t<Base>, holds a sentinel to the end. (exposition-only member object*)
  • stride_ (private) β€” ranges::range_difference_t<Base>, holds the stride value. (exposition-only member object*)
  • missing_ (private) β€” ranges::range_difference_t<Base>, usually holds the result of ranges::advance(current_, stride_, 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-= β€” advances or decrements the underlying iterator (public member function) (C++23)

πŸ”₯ Non-member functions πŸ”₯

  • operator==, operator<, operator>, operator<=, operator>=, operator<=> β€” compares the underlying iterators (function) (C++23)
  • operator+, operator- β€” performs iterator arithmetic (function) (C++23)
  • iter_move (C++23) β€” casts the result of dereferencing the underlying iterator to its associated rvalue reference type (function)
  • iter_swap (C++23) β€” swaps underlying pointed-to elements (function)

🌈 Example 🌈

This section is incomplete.

Reason: no example.

πŸ¦‹ References πŸ¦‹

  • C++23 standard (ISO/IEC 14882:2023):
  • 26.7.31.3 Class template stride_view::iterator [range.stride.iterator]

πŸ‘€ See also πŸ‘€

Category:

  • Todo no example

mwah πŸ’‹ that's the whole page, served fresh from source http://cppreference.com, version/date 2024.06.10, page std::ranges...w::iterator(3). periodt 🫢

πŸ“¦ where this page comes from