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

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

Hey bestie! πŸ’– Welcome to std::ranges...r::iterator(3), straight from the C++ Standard Libary β€” yes, that spelling is literally on the page, no cap. This manual is all about std::ranges::elements_view::iterator::iterator, and we're gonna construct it together. Let's go! ✨

🌸 NAME 🌸

std::ranges::elements_view::iterator::iterator β€” and also std::ranges::elements_view::iterator::iterator. She said it twice, and honestly? Iconic repetition. 😌

✨ Synopsis ✨

Okay so here's the constructor menu, bestie. Three overloads, all (since C++20), and the page labels them (1), (2), and (3). 🫢

/*iterator*/() requires
std::default_initializable<ranges::iterator_t<Base>>
= default;

(1) (since C++20)

constexpr explicit /*iterator*/( ranges::iterator_t<Base> current );

(2) (since C++20)

constexpr /*iterator*/( /*iterator*/<!Const> i ) requires Const &&
std::convertible_to<ranges::iterator_t<V>,
ranges::iterator_t<Base>>;

(3) (since C++20)

Construct an iterator. That's the whole vibe. πŸŽ€

  1. Value-initializes the underlying iterator current_ via its default member initializer (= ranges::iterator_t<Base>()). Cute default-initialization moment, fr fr.
  2. Initializes the underlying iterator current_ with std::move(current). Moving, slaying, periodt.
  3. Conversion from /*iterator*/<false> to /*iterator*/<true>. Initializes the underlying iterator current_ with std::move(i.current). Glow-up conversion energy. πŸ’…

πŸ’– Parameters πŸ’–

  • current β€” an iterator into (possibly const-qualified) V.
  • i β€” an /*iterator*/<false>.

πŸŽ€ Example πŸŽ€

This section is incomplete Reason: no example

πŸ¦‹ Category: πŸ¦‹

  • Todo no example

That's the tea, bestie! Source/version/date sign-off: http://cppreference.com, 2024.06.10, and std::ranges...r::iterator(3). Every detail made it in, and we ate. πŸ’–πŸ’…

πŸ“¦ where this page comes from