std::ranges...::operator[](3)

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

πŸ’– NAME πŸ’–

okay so bestie, this page is for std::ranges::zip_view::iterator::operator[] β€” and the NAME section literally gives us std::ranges::zip_view::iterator::operator[] again, because icon behavior:

  • std::ranges::zip_view::iterator::operator[] β€” std::ranges::zip_view::iterator::operator[]

It's from the C++ Standard Libary manual (yes, that spelling is literally in the header 😭), and the page title is std::ranges...::operator[](3).


πŸ¦‹ Synopsis πŸ¦‹

          constexpr auto operator[]( difference_type n ) const  (since C++23)
              requires /*all-random-access*/<Const, Views...>;

So there's a constexpr auto operator[]( difference_type n ) const marked since C++23, and it has a requires /*all-random-access*/<Const, Views...>; clause. That's the whole vibe check for this one ✨

It obtains a std::tuple that consists of underlying pointed-to elements at the given offset relative to current location. In bestie terms: tuple of the pointed-to stuff, offset from where you're at right now. Equivalent to:

        return /*tuple-transform*/([&]<class I>(I& i) -> decltype(auto) {
                   return i[iter_difference_t<I>(n)];
               }, current_);

🌸 Parameters 🌸

  • n β€” position relative to current location.

πŸŽ€ Return value πŸŽ€

  • The obtained tuple-like element.

πŸ’… Example πŸ’…

This section is incomplete.

Reason: no example 😭


πŸ“ Category πŸ“

  • * Todo no example

mwah πŸ’‹ that's the whole page, bestie. source: http://cppreference.com, version/date: 2024.06.10, page: std::ranges...::operator[](3).

πŸ“¦ where this page comes from