Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1012 Bytes

crbegin.md

File metadata and controls

62 lines (46 loc) · 1012 Bytes

crbegin

  • span[meta header]
  • std[meta namespace]
  • span[meta class]
  • function[meta id-type]
  • cpp23[meta cpp]
constexpr const_reverse_iterator crbegin() const noexcept;

概要

末尾を指す読み取り専用逆イテレータを取得する。

戻り値

return rbegin();
  • rbegin[link ./rbegin.md]

例外

投げない

#include <iostream>
#include <span>
#include <vector>

int main() {
  std::vector<int> v = {1, 2, 3, 4, 5};
  std::span<int, 5> sp{v};

  auto cit = sp.crbegin();

  std::cout << *cit << '\n';

  // これはできない
  // *cit = 0;
}
  • crbegin()[color ff0000]

出力

5

バージョン

言語

  • C++23

処理系

参照