名稱空間
變體
操作

std::ranges::adjacent_transform_view<V,F,N>::iterator<Const>::operator++,--,+=,-=

來自 cppreference.com
 
 
範圍庫 (Ranges library)
範圍介面卡 (Range adaptors)
 
 
constexpr /*迭代器*/& operator++();
(1) (C++23 起)
constexpr /*iterator*/ operator++(int);
(2) (C++23 起)
constexpr /*iterator*/& operator--()
    requires ranges::bidirectional_range<Base>;
(3) (C++23 起)
constexpr /*iterator*/ operator--( int )
    requires ranges::bidirectional_range<Base>;
(4) (C++23 起)
constexpr /*iterator*/& operator+=( difference_type n )
    requires ranges::random_access_range<Base>;
(5) (C++23 起)
constexpr /*iterator*/& operator-=( difference_type n )
    requires ranges::random_access_range<Base>;
(6) (C++23 起)

自增或自減迭代器

inner_ 為底層迭代器,並令 Base 為僅用於闡釋的成員型別。

等價於

1) 等價於 ++inner_; return *this;
2) 等價於 auto tmp = *this; ++*this; return tmp;
3) 等價於 --inner_; return *this;
4) 等價於 auto tmp = *this; --*this; return tmp;
5) 等價於 inner_ += n; return *this;
6) 等價於 inner_ -= n; return *this;

目錄

[編輯] 引數

n - 相對於當前位置的偏移量

[編輯] 返回值

1,3,5,6) *this
2,4) 改變前 *this 的副本

[編輯] 示例

[編輯] 參閱