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

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

πŸ’– NAME πŸ’–

This is the C++ Standard Libary manual (yes, that spelling is in the header, bestie 😭), page std::ranges...::operator[](3), and the name is std::ranges::slide_view::iterator::operator[] β€” the original NAME line literally repeats std::ranges::slide_view::iterator::operator[] after the dash. No cap. πŸ’…

✨ Synopsis ✨

Okay so here's the signature, bestie β€” read it exactly, no vibes-only paraphrasing:

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

It returns an element at specified relative location.

Let current_ and n_ be the underlying data members. Equivalent to:

return views::counted(current_ + pos, n_);.

🌸 Parameters 🌸

  • pos β€” position relative to current location.

πŸ¦‹ Return value πŸ¦‹

The element (of type value_type) at displacement pos 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

πŸ’– source/version: http://cppreference.com, dated 2024.06.10 β€” mwah, bye bestie! πŸ’–

πŸ“¦ where this page comes from