名稱空間
變體
操作

std::layout_stride::mapping<Extents>::mapping-traits

來自 cppreference.com
< cpp‎ | 容器‎ | mdspan‎ | layout stride‎ | mapping
 
 
 
 
std::layout_stride::mapping
成員函式
觀察器
mapping::is_uniquemapping::is_exhaustivemapping::is_stridedmapping::is_always_uniquemapping::is_always_exhaustivemapping::is_always_strided
非成員函式
 
static constexpr bool is_unique() noexcept;
(1) (C++23 起)
constexpr bool is_exhaustive() const noexcept;
(2) (C++23 起)
static constexpr bool is_strided() noexcept;
(3) (C++23 起)
static constexpr bool is_always_unique() noexcept;
(4) (C++23 起)
static constexpr bool is_always_exhaustive() noexcept;
(5) (C++23 起)
static constexpr bool is_always_strided() noexcept;
(6) (C++23 起)

mapping 的每個特化的每個例項都是唯一的(unique)和跨幅化的(strided)。

若下列條件之一為 true,則該對映是窮盡的(exhaustive):

  • rank_0,或
  • 存在一個在範圍 [0rank_) 內的整數的排列 p,使得
  • stride(p[0]) 等於 1,且
  • stride(p[i]) 等於 stride(p[i - 1]) * extents().extent(p[i - 1])
對於所有 i[1rank_) 內,其中 p[i]p 的第 ith 個元素。

rank_ 是定義於 std::layout_stride::mapping 中的僅用於闡釋的靜態成員常量。)

關於這些謂詞對映特徵的語義,請參閱 佈局對映 (LayoutMapping)

目錄

[編輯] 引數

(無)

[編輯] 返回值

1,3-4,6) true
2) 若對映是窮盡的則為 true(見上文)
5) false

[編輯] 示例

[編輯] 參閱