Spec-Zone.ru › C++

std::ranges::chunk_by_view<V,Pred>::iterator::operator++,--

constexpr /*iterator*/& operator++();
(1) (начиная с C++23)
constexpr /*iterator*/ operator++(int);
(2) (начиная с C++23)
constexpr /*iterator*/& operator--() requires ranges::bidirectional_range<V>;
(3) (начиная с C++23)
constexpr /*iterator*/ operator--(int) requires ranges::bidirectional_range<V>;
(4) (начиная с C++23)

Увеличивает или уменьшает итератор.

Пусть parent_, current_ и next_ — соответствующие базовые (только для описания) элементы данных итератора.

Пусть find-next и find-prev — соответствующие функции-члены (только для описания) ranges::chunk_by_view.

1) Эквивалентно:
current_ = next_;
next_ = parent_->/*find-next*/(current_);
return *this;
Поведение не определено, если до вызова этого оператора current_ равно next_.
2) Эквивалентно: auto tmp = *this; ++*this; return tmp;
3) Эквивалентно:
next_ = current_;
current_ = parent_->/*find-prev*/(next_);
return *this;
4) Эквивалентно: auto tmp = *this; --*this; return tmp;

Параметры

(нет)

Возвращаемое значение

1,3) *this
2,4) копия *this, созданная до изменения.

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/ranges/chunk_by_view/iterator/operator_arith

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API