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

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

πŸ’– std::ranges...r::iterator(3) πŸ’–

okay so bestie, this is the std::ranges...r::iterator(3) page from the C++ Standard Libary manual β€” yes, β€œLibary” is literally how it’s spelled in the header, iykyk πŸ˜­πŸ’…. We’re talking about the constructor for std::ranges::stride_view::iterator::iterator, and we are gonna get through every signature, every requirement, every tiny private little detail together. Periodt. ✨


✨ NAME ✨

std::ranges::stride_view::iterator::iterator β€” std::ranges::stride_view::iterator::iterator

It’s giving constructor energy, fr fr. 🫢


🌸 SYNOPSIS 🌸

          /*iterator*/()
              requires std::default_initializable<ranges::iterator_t<Base>> (1)
       (since C++23)
          = default;
          constexpr /*iterator*/( /*iterator*/<!Const> i )

              requires Const and
                  std::convertible_to<ranges::iterator_t<V>,                (2)
       (since C++23)
          ranges::iterator_t<Base>> and

                  std::convertible_to<ranges::sentinel_t<V>,
          ranges::sentinel_t<Base>>;
          private:

          constexpr /*iterator*/( /*Parent*/& parent,
       (exposition
                                  ranges::iterator_t<Base> current,         (3)
       only*)

                                  ranges::range_difference_t<Base> missing
          = 0 );

Constructs an iterator. That’s the whole vibe of this page, no cap. πŸ¦‹

🌟 Constructs an iterator 🌟

  1. Default constructor. It value-initializes:
    • current_ with ranges::iterator_t<Base>(),
    • end_ with ranges::sentinel_t<Base>(),
    • stride_ with 0,
    • missing_ with 0.
  2. Conversion from /*iterator*/<false> to /*iterator*/<true>. Initializes:
    • current_ with std::move(i.current_),
    • end_ with std::move(i.end_),
    • stride_ with i.stride_,
    • missing_ with i.missing_.
  3. A private constructor which is used by stride_view::begin and stride_view::end. This constructor is not accessible to users. Initializes:
    • current_ with std::move(current),
    • end_ with ranges::end(parent->base_),
    • stride_ with parent->stride_,
    • missing_ with missing.
bestie, that third one is private β€” not accessible to users β€” so don’t try to slide into its DMs πŸ™ˆπŸ’€.

πŸ’… PARAMETERS πŸ’…

  • i β€” an /*iterator*/<false>

πŸŽ€ EXAMPLE πŸŽ€

This section is incomplete Reason: no example

not me crying over a missing example 😭 no example bestie, it’s giving unfinished homework. πŸ“


πŸ¦‹ CATEGORY πŸ¦‹

  • Todo no example

mwah πŸ’‹ β€” this cutie came from http://cppreference.com, dated 2024.06.10. Later, bestie! πŸ’–βœ¨

πŸ“¦ where this page comes from