Skip to content

Commit 14b6cb2

Browse files
committed
mdspan/layout_right: メタ情報等を調整(#1077)
1 parent 609bb74 commit 14b6cb2

File tree

7 files changed

+44
-7
lines changed

7 files changed

+44
-7
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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)

reference/mdspan/layout_right/mapping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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

reference/mdspan/layout_right/mapping/op_call.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
## 戻り値

reference/mdspan/layout_right/mapping/op_constructor.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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)

reference/mdspan/layout_right/mapping/op_equal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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

reference/mdspan/layout_right/mapping/required_span_size.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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

reference/mdspan/layout_right/mapping/stride.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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

0 commit comments

Comments
 (0)