constexpr const_iterator cend() const noexcept; // (1) C++26
概要
末尾の次を指す読み取り専用イテレータを取得する。
戻り値
const_iterator型で末尾の次を指すイテレータを返す。
例外
投げない
計算量
定数時間
例
#include <print>
#include <inplace_vector>
int main()
{
std::inplace_vector<int, 5> iv = {1, 2, 3};
for (auto i = iv.cbegin(); i != iv.cend(); ++i) {
std::println("{}", *i);
}
}
出力
1
2
3
バージョン
言語
- C++26
処理系
- Clang: 23 ✅
- GCC: 16 ✅
- Visual C++: 2026 Update 2 ❌