最終更新日時(UTC):
が更新

履歴 編集

function
<inplace_vector>

std::inplace_vector::crend(C++26)

constexpr const_reverse_iterator crend() const noexcept; // (1) C++26

概要

先頭の前を指す読み取り専用逆イテレータを取得する。

戻り値

const_reverse_iterator型で先頭の前を指す逆イテレータを返す。

例外

投げない

計算量

定数時間

#include <print>
#include <inplace_vector>

int main()
{
  std::inplace_vector<int, 5> iv = {1, 2, 3};

  for (auto i = iv.crbegin(); i != iv.crend(); ++i) {
    std::println("{}", *i);
  }
}

出力

3
2
1

バージョン

言語

  • C++26

処理系

参照