std::set<Key,Compare,Allocator>::rend, std::set<Key,Compare,Allocator>::crend
来自cppreference.com
reverse_iterator rend(); | (1) | (C++11 起为 noexcept) (C++26 起为 constexpr) |
const_reverse_iterator rend()const; | (2) | (C++11 起为 noexcept) (C++26 起为 constexpr) |
const_reverse_iterator crend()constnoexcept; | (3) | (C++11 起) (C++26 起为 constexpr) |
返回指向逆向的 *this 的尾后元素的逆向迭代器。它对应非逆向的 *this 的首元素的前一元素。
返回的迭代器仅表现为哨位。不保证它可解引用。
目录 |
[编辑]返回值
指向尾后元素的逆向迭代器。
[编辑]复杂度
常数。
[编辑]示例
运行此代码
输出:
⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼
[编辑]参阅
(C++11) | 返回指向起始的逆向迭代器 (公开成员函数) |
(C++14) | 返回容器或数组的逆向尾迭代器 (函数模板) |