std::flat_multiset<Key,Compare,KeyContainer>:: rend, std::flat_multiset<Key,Compare,KeyContainer>:: crend
From cppreference.net
<
cpp
|
container
|
flat multiset
C++
Containers library
|
(C++17)
|
||||
| Sequence | ||||
|
(C++11)
|
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
|
(C++11)
|
||||
| Associative | ||||
| Unordered associative | ||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
||||
| Adaptors | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
| Views | ||||
|
(C++20)
|
||||
|
(C++23)
|
||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
std::flat_multiset
| Member types | ||||
| Member functions | ||||
| Non-member functions | ||||
| Helper classes | ||||
| Tags | ||||
| Deduction guides | ||||
|
reverse_iterator rend
(
)
noexcept
;
|
(1) |
(C++23以降)
(C++26以降 constexpr) |
|
const_reverse_iterator rend
(
)
const
noexcept
;
|
(2) |
(C++23以降)
(C++26以降 constexpr) |
|
const_reverse_iterator crend
(
)
const
noexcept
;
|
(3) |
(C++23以降)
(C++26以降 constexpr) |
反転された * this の最後の要素の次を指す逆方向イテレータを返します。これは非反転の * this の最初の要素の前の要素に対応します。
この返されたイテレータはセンチネルとしてのみ機能します。これが デリファレンス可能 であることは保証されません。
目次 |
戻り値
最後の要素の次の要素への逆イテレータ。
計算量
定数。
注記
iterator
と
const_iterator
の両方が定数イテレータであるため(実際には同じ型である可能性もあります)、これらのメンバ関数によって返されるイテレータを通じてコンテナの要素を変更することはできません。
例
このコードを実行
#include <iostream> #include <flat_set> int main() { std::flat_multiset<unsigned> rep{1, 2, 3, 4, 1, 2, 3, 4}; for (auto it = rep.crbegin(); it != rep.crend(); ++it) { for (auto n = *it; n > 0; --n) std::cout << "⏼" << ' '; std::cout << '\n'; } }
出力:
⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼ ⏼
関連項目
|
先頭を指す逆方向イテレータを返す
(public member function) |
|
|
(C++14)
|
コンテナまたは配列の終端を指す逆方向イテレータを返す
(function template) |