std::ranges...r++,--,+=,-=(3)
β¨ NAME β¨
okay bestie, welcome to the std::ranges...r++,--,+=,-=(3) page from the C++ Standard Libary manual π
(yes, thatβs the manual name on the page, weβre keeping it cute and accurate π«Ά).
The actual name is literally:
std::ranges::elements_view::iterator::operator++,--,+=,-= - std::ranges::elements_view::iterator::operator++,--,+=,-=
β¨ Synopsis β¨
hereβs the whole overload lineup, no cap π:
constexpr /*iterator*/& operator++(); (1) (since C++20)
constexpr void operator++( int ); (2) (since C++20)
constexpr /*iterator*/ operator++( int ) (3) (since C++20)
requires ranges::forward_range<Base>;
constexpr /*iterator*/& operator--() (4) (since C++20)
requires ranges::bidirectional_range<Base>;
constexpr /*iterator*/ operator--( int ) (5) (since C++20)
requires ranges::bidirectional_range<Base>;
constexpr /*iterator*/& operator+=( difference_type n ) (6) (since C++20)
requires ranges::random_access_range<Base>;
constexpr /*iterator*/& operator-=( difference_type n ) (7) (since C++20)
requires ranges::random_access_range<Base>;
Increments or decrements the iterator. Let current_ be the underlying iterator. π¦
- Equivalent to
++current_; return *this; - Equivalent to
++current_; - Equivalent to
auto tmp = *this; ++*this; return tmp; - Equivalent to
--current_; return *this; - Equivalent to
auto tmp = *this; --*this; return tmp; - Equivalent to
current_ += n; return *this; - Equivalent to
current_ -= n; return *this;
β¨ Parameters β¨
nβ position relative to current location π
β¨ Return value β¨
1,4,6,7)β*this2)β (none)3,5)β a copy of*thisthat was made before the change
thatβs the whole vibe, bestie π«Ά source/version and date on the page: http://cppreference.com β 2024.06.10 β¨
π¦ 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