std::ranges...erator::base(3)
π 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.
- Equivalent to:
return current_;. - 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
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms