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