名稱空間
變體
操作

std::move_iterator<Iter>::operator++,+,+=,--,-,-=

來自 cppreference.com
 
 
迭代器庫
迭代器概念
迭代器原語
演算法概念與工具
間接可呼叫概念
常用演算法要求
(C++20)
(C++20)
(C++20)
工具
(C++20)
迭代器介面卡
範圍訪問
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
std::move_iterator
成員函式
move_iterator::operator++move_iterator::operator+move_iterator::operator+=move_iterator::operator--move_iterator::operator-move_iterator::operator-=
非成員函式
(C++20)
(C++20)
 
move_iterator& operator++();
(1) (自 C++17 起為 constexpr)
move_iterator& operator--();
(2) (自 C++17 起為 constexpr)
(3)
move_iterator operator++( int );
(自 C++17 起為 constexpr)
(C++20 前)
constexpr auto operator++( int );
(C++20 起)
move_iterator operator--( int );
(4) (自 C++17 起為 constexpr)
move_iterator operator+( difference_type n ) const;
(5) (自 C++17 起為 constexpr)
move_iterator operator-( difference_type n ) const;
(6) (自 C++17 起為 constexpr)
move_iterator& operator+=( difference_type n );
(7) (自 C++17 起為 constexpr)
move_iterator& operator-=( difference_type n );
(8) (自 C++17 起為 constexpr)

遞增或遞減底層迭代器。

 過載  等價於
(1) ++current ; return *this;
(2) --current ; return *this;
(3)

move_iterator tmp = *this; ++current ; return tmp;

(C++20 前)
(C++20 起)
(4) move_iterator tmp = *this; --current ; return tmp;
(5) return move_iterator(current + n);
(6) return move_iterator(current - n);
(7) current += n; return *this;
(8) current -= n; return *this;

目錄

[編輯] 引數

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

[編輯] 返回值

如上所述。

[編輯] 示例

[編輯] 參閱

(C++11)
前進迭代器
(函式模板) [編輯]
(C++11)
計算兩個迭代器介面卡之間的距離
(函式模板) [編輯]