std::ranges...erator::base(3)

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

πŸ’– NAME πŸ’–

std::ranges::enumerate_view::iterator::base β€” bestie, it's literally the member function that hands you back the iterator hiding underneath your enumerate_view iterator. Iconic little accessor, no cap. It lives in the C++ Standard Libary (that's the manual's own spelling, we're keeping it, mwah πŸ’…).


✨ Synopsis ✨

constexpr const ranges::iterator_t<Base>& base() const& noexcept; (1)
(since C++23)
constexpr ranges::iterator_t<Base> base() &&;                     (2)
(since C++23)

So what does it actually do? It returns the underlying iterator. πŸ¦‹ Let current_ be the underlying iterator β€” that's our main character for this whole page.

  1. Equivalent to: return current_;.
  2. Equivalent to: return std::move(current_);.

Two overloads, one vibe: overloading done right, we love to see it πŸ”₯


🫢 Parameters 🫢

(none)

Not a single argument. Zero. Nada. She takes nothing and she gives everything πŸŽ€


🌈 Return value 🌈

An iterator to the current element in enumerate_view. Like, that's the whole thing. That's the gift. 🎁✨


🌸 Example 🌸

This section is incomplete.

Reason: no example β€” yeah bestie, we got nothing here πŸ˜­πŸ™ˆ

πŸŽ€ Category πŸŽ€

  • Todo no example

(it's giving "someone should write an example" energy, fr fr πŸ’€)


okay that's the whole page, go forth and dereference responsibly πŸ§šβ€β™€οΈπŸ’œ

Sign-off cuteness: this lil beauty comes from http://cppreference.com, dated 2024.06.10 β€” literally saving the date like it's a birthday πŸŽ‚βœŒοΈ

πŸ“¦ where this page comes from