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

来自cppreference.com
< cpp‎ | container‎ | mdspan‎ | layout stride‎ | mapping
 
 
 
 
 
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 每个特化的每个实例都是唯一且跨步的。

如果以下条件之一为 true,那么映射就是穷尽的:

  • rank_0,或者
  • 存在范围 [0rank_) 中的整数的某个排列 p,使得对于 [1rank_) 中的每个 i
  • stride(p[0]) 等于 1
  • stride(p[i]) 等于 stride(p[i - 1]) * extents().extent(p[i - 1])
其中 p[i]p 的第 i 个元素。

rank_std::layout_stride::mapping 中定义的仅用于阐释的静态成员常量。)

有关这些谓词映射特征的语义,参见布局映射 (LayoutMapping)

参数

(无)

返回值

1,3-4,6)true
2)true 若映射是穷尽的(见上文)
5)false

示例

参阅