Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 982 Bytes

File metadata and controls

58 lines (42 loc) · 982 Bytes

mapping

  • mdspan[meta header]
  • function[meta id-type]
  • std[meta namespace]
  • mdspan[meta class]
  • cpp23[meta cpp]
constexpr const mapping_type& mapping() const noexcept;

概要

レイアウトマッピングmap_を取得する。

戻り値

map_

例外

投げない

#include <cassert>
#include <mdspan>

int main()
{
  int arr[] = {1, 2, 3, 4, 5, 6};
  // 静的要素数 2x3 の2次元配列ビュー
  std::mdspan<int, std::extents<size_t, 2, 3>> mat{arr};

  auto map = mat.mapping();
  assert(map.required_span_size() == 6);
}
  • mapping()[color ff0000]

出力

バージョン

言語

  • C++23

処理系

参照