std::ranges...:operator[](3)
π 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
- 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