std::reverse_iterator::operators
STD:反向[医]迭代器::运算符++,+,+=,-,-,-=
| (1) | |
---|---|---|
reverse_iterator& operator++( | (until C++17) | |
constexpr reverse_iterator& operator++( | (since C++17) | |
| (2) | |
reverse_iterator& operator--( | (until C++17) | |
constexpr reverse_iterator& operator--( | (since C++17) | |
| (3) | |
reverse_iterator operator++( int | (until C++17) | |
constexpr reverse_iterator operator++( int | (since C++17) | |
| (4) | |
reverse_iterator operator--( int | (until C++17) | |
constexpr reverse_iterator operator--( int | (since C++17) | |
| (5) | |
reverse_iterator operator+( difference_type n ) const; | (until C++17) | |
constexpr reverse_iterator operator+( difference_type n ) const; | (since C++17) | |
| (6) | |
reverse_iterator operator-( difference_type n ) const; | (until C++17) | |
constexpr reverse_iterator operator-( difference_type n ) const; | (since C++17) | |
| (7) | |
reverse_iterator& operator+=( difference_type n | (until C++17) | |
constexpr reverse_iterator& operator+=( difference_type n | (since C++17) | |
| (8) | |
reverse_iterator& operator-=( difference_type n | (until C++17) | |
constexpr reverse_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%29reverse_iterator(base()-n)
或reverse_iterator(base()+n)
分别。
7-8%29*this
例
另见
operator+ | advances the iterator (function template) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。