std::ranges...view::begin(3)

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

std::ranges::enumerate_view::begin πŸ’…

okay bestie, welcome to the C++ Standard Libary manual, section 3 β€” and we're hyping up std::ranges::enumerate_view::begin, the member function that hands you the iterator to the very first element of an enumerate_view. It's giving "start the range off right" main character energy ✨.

🌸 NAME 🌸

std::ranges::enumerate_view::begin β€” std::ranges::enumerate_view::begin. Yes bestie, the name is the name, and it's iconic πŸ’–.

✨ Synopsis ✨

Here's the signature tea, copied with care:

          constexpr auto begin() requires (!__simple_view<V>);
       (1) (since C++23)
          constexpr auto begin() const requires
       (2) (since C++23)
          /*range-with-movable-references*/<const V>;

Returns an iterator to the first element of the enumerate_view.

Let base_ denote the underlying view.

  1. Equivalent to return /*iterator*/<false>(ranges::begin(base_), 0);.
  2. Equivalent to return /*iterator*/<true>(ranges::begin(base_), 0);.

🫢 Parameters 🫢

  • none β€” she takes no parameters, periodt 😌

πŸ’– Return value πŸ’–

Iterator to the first element. That's the whole point, and it ate πŸ”₯.

πŸ¦‹ Example πŸ¦‹

This section is incomplete.

Reason: no example.

not me staring at the missing example like πŸ‘€ β€” the page really says no example, so we're not making one up, bestie.

🌈 See also 🌈

  • end β€” returns an iterator or a sentinel to the end (C++23) (public member function)
  • ranges::begin β€” returns an iterator to the beginning of a range (C++20) (customization point object)

πŸ‘‘ Category πŸ‘‘

  • * Todo no example

mwah πŸ’‹ that's the whole page β€” sourced from http://cppreference.com, version/date 2024.06.10, and it's page std::ranges...view::begin(3). bye bestie, go slay your ranges 🫢✨

πŸ“¦ where this page comes from