File tree Expand file tree Collapse file tree 7 files changed +44
-7
lines changed
Expand file tree Collapse file tree 7 files changed +44
-7
lines changed Original file line number Diff line number Diff line change 1+ # index-cast
2+ * mdspan[ meta header]
3+ * function template[ meta id-type]
4+ * std[ meta namespace]
5+ * extents[ meta class]
6+ * cpp23[ meta cpp]
7+
8+ ``` cpp
9+ template <class OtherIndexType >
10+ static constexpr auto index-cast(OtherIndexType&& i) noexcept ; // 説明専用
11+ ```
12+
13+ ## 概要
14+ 多次元配列のインデクス型へと変換する、説明専用のメンバ関数である。
15+
16+
17+ ## 戻り値
18+ - ` OtherIndexType ` が` bool ` 型以外の整数型の場合、` return i; ` と等価。
19+ - ` OtherIndexType ` が` bool ` 型の場合、` return static_cast<index_type>(i); ` と等価。
20+
21+
22+ ## 例外
23+ 投げない
24+
25+
26+ ## バージョン
27+ ### 言語
28+ - C++23
29+
30+
31+ ## 参照
32+ - [ P0009R18 MDSPAN] ( https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0009r18.html )
Original file line number Diff line number Diff line change 22* mdspan[ meta header]
33* class template[ meta id-type]
44* std[ meta namespace]
5- * mdspan [ meta class]
5+ * layout_right [ meta class]
66* cpp23[ meta cpp]
77
88``` cpp
Original file line number Diff line number Diff line change 22* mdspan[ meta header]
33* function template[ meta id-type]
44* std[ meta namespace]
5- * mapping[ meta class]
5+ * layout_right:: mapping[ meta class]
66* cpp23[ meta cpp]
77
88``` cpp
@@ -21,7 +21,7 @@ constexpr index_type operator()(Indices... i) const noexcept;
2121
2222
2323## 事前条件
24- 多次元インデクス値`i...` は、多次元配列サイズ`extents_`における有効なインデクスであること。
24+ 多次元インデクス値[`extents_type::index-cast(i)`](../../extents/index-cast.md) は、多次元配列サイズ`extents_`における有効なインデクスであること。
2525
2626
2727## 戻り値
Original file line number Diff line number Diff line change 22* mdspan[ meta header]
33* function template[ meta id-type]
44* std[ meta namespace]
5- * mapping[ meta class]
5+ * layout_right:: mapping[ meta class]
66* cpp23[ meta cpp]
77
88``` cpp
@@ -145,5 +145,10 @@ int main()
145145- [ Visual C++] ( /implementation.md#visual_cpp ) : ??
146146
147147
148+ ## 関連項目
149+ - [ ` layout_left::mapping ` ] ( ../../layout_left/mapping.md.nolink )
150+ - [ ` layout_stride::mapping ` ] ( ../../layout_stride/mapping.md.nolink )
151+
152+
148153## 参照
149154- [ P0009R18 MDSPAN] ( https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0009r18.html )
Original file line number Diff line number Diff line change 22* mdspan[ meta header]
33* function template[ meta id-type]
44* std[ meta namespace]
5- * mapping[ meta class]
5+ * layout_right:: mapping[ meta class]
66* cpp23[ meta cpp]
77
88``` cpp
Original file line number Diff line number Diff line change 22* mdspan[ meta header]
33* function[ meta id-type]
44* std[ meta namespace]
5- * mapping[ meta class]
5+ * layout_right:: mapping[ meta class]
66* cpp23[ meta cpp]
77
88``` cpp
Original file line number Diff line number Diff line change 22* mdspan[ meta header]
33* function[ meta id-type]
44* std[ meta namespace]
5- * mapping[ meta class]
5+ * layout_right:: mapping[ meta class]
66* cpp23[ meta cpp]
77
88``` cpp
You can’t perform that action at this time.
0 commit comments