std::ranges::chunk_by_view<V,Pred>:: iterator :: operator++,--
From cppreference.net
<
cpp
|
ranges
|
chunk by view
|
iterator
C++
Ranges library
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
std::ranges::chunk_by_view
| Member functions | ||||
| Deduction guides | ||||
| Iterator | ||||
|
chunk_by_view::
iterator
::operator++
chunk_by_view:: iterator ::operator++ (int) chunk_by_view:: iterator ::operator-- chunk_by_view:: iterator ::operator-- (int) |
||||
|
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_
作为
iterator
对应的底层(仅用于说明的)数据成员。
令 find-next 和 find-prev 作为 ranges::chunk_by_view 的相应(仅用于说明的)成员函数。
1)
等价于:
current_ = next_; next_ = parent_->/*find-next*/(current_); return *this;
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
副本。