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

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

πŸ’… NAME

okay so bestie, welcome to std::ranges...:operator[](3) β€” that's the page from the C++ Standard Libary manual, and it's literally all about std::ranges::adjacent_transform_view::iterator::operator[] and also std::ranges::adjacent_transform_view::iterator::operator[]. same thing, no cap πŸ’–


✨ Synopsis

          constexpr decltype(auto) operator[]( difference_type n ) const
       (since C++23)
              requires ranges::random_access_range<Base>;

so yeah, it returns an element at the specified relative location. parent_ and inner_ are the data members of the iterator, and this is equivalent to:

        return apply([&](const auto&... iters) -> decltype(auto)
                     {
                        return invoke(*parent_->fun_, iters[n]...);
                     },
                     inner_.current_);

πŸŽ€ Parameters

  • n β€” position relative to current location

πŸ¦‹ Return value

The element at displacement n relative to the current location. slay ✨

🌸 Example

This section is incomplete. Reason: no example πŸ™ˆ

🌈 See also

  • operator* accesses the element (C++23) (public member function)

⭐ Category

  • Todo no example

mwah πŸ’‹ source/version: http://cppreference.com, dated 2024.06.10, and yes bestie this is the std::ranges...:operator[](3) page. periodt 🫢

πŸ“¦ where this page comes from