std::ranges...l::sentinel(3)

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

🌸 NAME 🌸

okay so bestie, welcome to std::ranges::adjacent_transform_view::sentinel::sentinel β€” page std::ranges...l::sentinel(3) from the C++ Standard Libary manual. The name is literally repeated on the page: std::ranges::adjacent_transform_view::sentinel::sentinel β†’ std::ranges::adjacent_transform_view::sentinel::sentinel. and honestly? iconic. This is the constructor page for that sentinel. πŸ’…

✨ Synopsis ✨

here’s the signature tea, copied exactly because we do not mess with code:

          /*sentinel*/() = default;                                     (1)
       (since C++23)
          constexpr /*sentinel*/( /*sentinel*/<!Const> i )

              requires Const &&                                         (2)
       (since C++23)

                  std::convertible_to</*inner-sentinel*/<false>,
          /*inner-sentinel*/<Const>>;
          private:
          constexpr explicit /*sentinel*/( /*inner-sentinel*/<Const>    (3)
       (exposition only*)
          inner );

okay so what does it do? Construct a sentinel. That’s the whole assignment. Let’s break it down:

  1. Default constructor. Default-initializes the underlying sentinel inner_.
  2. Conversion from /*sentinel*/<false> to /*sentinel*/<true>. Move constructs the underlying sentinel inner_ with std::move(i.inner_). It’s gated by requires Const && and std::convertible_to</*inner-sentinel*/<false>, /*inner-sentinel*/<Const>>; from the synopsis above.
  3. Private constructor, not for users. This sentinel also has a private constructor which is used by ranges::adjacent_transform_view::end. This constructor is not accessible to users. Initializes the underlying sentinel inner_ with inner.

πŸ’– Parameters πŸ’–

  • i β€” an /*sentinel*/<false>.
  • inner β€” a sentinel of type adjacent_transform_view::inner_sentinel.

🌈 Example 🌈

This section is incomplete Reason: no example

the example section is literally a todo, bestie 😭 no example yet.

πŸŽ€ Category πŸŽ€

  • Todo no example

okay that’s the page, bestie 🫢 β€” sourced from http://cppreference.com, dated 2024.06.10, and filed under std::ranges...l::sentinel(3). periodt πŸ’…

πŸ“¦ where this page comes from