std::ranges...perator++,--(3)
πΈ NAME πΈ
This is the std::ranges...perator++,--(3) page, aka std::ranges::join_view::iterator::operator++,--, from the C++ Standard Libary manual, bestie. π
The name is std::ranges::join_view::iterator::operator++,--, and the description is literally the same: std::ranges::join_view::iterator::operator++,--. Slay.
β¨ Synopsis β¨
Okay so here are the overloads, and every single one is since C++20. The /*iterator*/ and /*ref-is-glvalue*/ bits are placeholders exactly as written, iykyk.
(1) (since C++20):
constexpr /*iterator*/& operator++();
(2) (since C++20):
constexpr void operator++( int );
(3) (since C++20):
constexpr /*iterator*/ operator++( int )
requires /*ref-is-glvalue*/ && ranges::forward_range<Base> &&
ranges::forward_range<ranges::range_reference_t<Base>>;
(4) (since C++20):
constexpr iterator& operator--()
requires /*ref-is-glvalue*/ && ranges::bidirectional_range<Base> &&
ranges::bidirectional_range<ranges::range_reference_t<Base>> &&
ranges::common_range<ranges::range_reference_t<Base>>;
(5) (since C++20):
constexpr /*iterator*/ operator--( int )
requires /*ref-is-glvalue*/ && ranges::bidirectional_range<Base> &&
ranges::bidirectional_range<ranges::range_reference_t<Base>> &&
ranges::common_range<ranges::range_reference_t<Base>>;
These increment or decrement the underlying iterator. π
Let inner_ and outer_ be the underlying iterators, and parent_ be the pointer to parent ranges::join_view, and the constant /*ref-is-glvalue*/ be std::is_reference_v<ranges::range_reference_t<Base>>. Periodt.
1) Let /*inner-range*/ be:
*outer_, if/*ref-is-glvalue*/ == true;*parent_->inner_otherwise.
Equivalent to:
auto&& inner_rng = /*inner-range*/;
if (++inner_ == ranges::end(inner_rng)) {
++outer_;
satisfy();
}
return *this;
2) Equivalent to: ++*this.
3) Equivalent to:
auto tmp = *this;
++*this;
return tmp;
4) Equivalent to:
if (outer_ == ranges::end(parent_->base_))
inner_ = ranges::end(*--outer_);
while (inner_ == ranges::begin(*outer_))
inner_ = ranges::end(*--outer_);
--inner_;
return *this;
5) Equivalent to:
auto tmp = *this;
--*this;
return tmp;
π«Ά Parameters π«Ά
(none) β no parameters, bestie. Literally none. Zero. Zilch. π
π Return value π
1,4)*this2)(none)3,5)a copy of*thisthat was made before the change
That's the whole page, bestie! Source/version: http://cppreference.com; date: 2024.06.10; page: std::ranges...perator++,--(3). Mwah π
π¦ 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