std::layout_stride::mapping<Extents>::mapping-traits
來自 cppreference.com
< 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
[編輯] 示例
本節不完整 原因:無示例 |
[編輯] 參閱
本節不完整 |