std::layout_stride::mapping<Extents>::mapping-traits
来自 cppreference.cn
< cpp | 容器 | 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
的每个特化的每个实例都是唯一的(unique)和跨幅化的(strided)。
若下列条件之一为 true,则该映射是穷尽的(exhaustive):
- rank_ 为 0,或
- 存在一个在范围
[
0,
rank_)
内的整数的排列 p,使得
- stride(p[0]) 等于 1,且
- stride(p[i]) 等于 stride(p[i - 1]) * extents().extent(p[i - 1])
- 对于所有 i 在
[
1,
rank_)
内,其中 p[i] 是 p 的第 ith 个元素。
(rank_ 是定义于 std::layout_stride::mapping 中的仅用于阐释的静态成员常量。)
关于这些谓词映射特征的语义,请参阅 布局映射 (LayoutMapping)。
目录 |
[编辑] 参数
(无)
[编辑] 返回值
1,3-4,6) true
2) 若映射是穷尽的则为 true(见上文)
5) false
[编辑] 示例
本节不完整 原因:无示例 |
[编辑] 参阅
本节不完整 |