rend
语法:
1 |
reverse_iterator rend(); |
rend()返回一个指向双向队列头部的逆向迭代器。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
源代码/** * Returns a read/write reverse iterator that points to one before the * first element in the %deque. Iteration is done in reverse element * order. */ reverse_iterator rend() { return reverse_iterator(this->_M_impl._M_start); } /** * Returns a read-only (constant) reverse iterator that points to one * before the first element in the %deque. Iteration is done in reverse * element order. */ const_reverse_iterator rend() const { return const_reverse_iterator(this->_M_impl._M_start); } |
测试代码
测试结果
9 9 9 9 9 9 9 9 9 9 1