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,或者
- 存在范围
[
0,
rank_)
中的整数的某个排列 p,使得对于[
1,
rank_)
中的每个 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
示例
本节未完成 原因:暂无示例 |
参阅
本节未完成 |