std::move_iterator::operators
STD:移动[医]迭代器::运算符++,+,+=,-,-,-=
| (1) | |
---|---|---|
move_iterator& operator++( | (until C++17) | |
constexpr move_iterator& operator++( | (since C++17) | |
| (2) | |
move_iterator& operator--( | (until C++17) | |
constexpr move_iterator& operator--( | (since C++17) | |
| (3) | |
move_iterator operator++( int | (until C++17) | |
constexpr move_iterator operator++( int | (since C++17) | |
| (4) | |
move_iterator operator--( int | (until C++17) | |
constexpr move_iterator operator--( int | (since C++17) | |
| (5) | |
move_iterator operator+( difference_type n ) const; | (until C++17) | |
constexpr move_iterator operator+( difference_type n ) const; | (since C++17) | |
| (6) | |
move_iterator operator-( difference_type n ) const; | (until C++17) | |
constexpr move_iterator operator-( difference_type n ) const; | (since C++17) | |
| (7) | |
move_iterator& operator+=( difference_type n | (until C++17) | |
constexpr move_iterator& operator+=( difference_type n | (since C++17) | |
| (8) | |
move_iterator& operator-=( difference_type n | (until C++17) | |
constexpr move_iterator& operator-=( difference_type n | (since C++17) |
递增或减少迭代器。
1-2%29前增量或预递减1。
3-4%29次增加或减少后,分别减少1次.
5-6%29返回一个迭代器,该迭代器由n
或-n
分别就位。
7-8%29将迭代器升级为n
或-n
分别就位。
返回值
1-2%29*this
3-4%29份*this
那是在改变之前
5-6%29move_iterator(base()+n)
或move_iterator(base()-n)
分别。
7-8%29*this
例
另见
operator+ | advances the iterator (function template) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
http://en.cppreference.com/w/cpp/iterator/move[医]迭代器/算子[医]阿瑞斯