Skip to content

Commit 2b4f515

Browse files
committed
execution: completion_signatures(_of_t) (#1384)
1 parent 3e8c7c7 commit 2b4f515

File tree

6 files changed

+121
-9
lines changed

6 files changed

+121
-9
lines changed

reference/execution/execution.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace std::execution {
6363
| 名前 | 説明 | 対応バージョン |
6464
|------|------|----------------|
6565
| [`execution::receiver`](execution/receiver.md) | Receiver型 (concept) | C++26 |
66-
| [`execution::receiver_of`](execution/receiver_of.md) | 完了シグネチャ集合を持つReceiver (concept) | C++26 |
66+
| [`execution::receiver_of`](execution/receiver_of.md) | 指定完了シグネチャ集合に適合するReceiver (concept) | C++26 |
6767
| [`execution::set_value`](execution/set_value.md.nolink) | 値による完了関数 (customization point object) | C++26 |
6868
| [`execution::set_error`](execution/set_error.md.nolink) | エラーによる完了関数 (customization point object) | C++26 |
6969
| [`execution::set_stopped`](execution/set_stopped.md.nolink) | 停止による完了関数 (customization point object) | C++26 |
@@ -83,8 +83,8 @@ namespace std::execution {
8383
| [`execution::sender`](execution/sender.md) | Sender型 (concept) | C++26 |
8484
| [`execution::sender_in`](execution/sender_in.md) | 指定環境で有効なSender (concept) | C++26 |
8585
| [`execution::sender_to`](execution/sender_to.md) | 指定Receiverに接続可能なSender (concept) | C++26 |
86-
| [`execution::get_completion_signatures`](execution/get_completion_signatures.md.nolink) | 完了シグネチャ取得の問い合わせオブジェクト (customization point object) | C++26 |
87-
| [`execution::completion_signatures_of_t`](execution/get_completion_signatures.md.nolink) | Senderから完了シグネチャを取得 (alias template) | C++26 |
86+
| [`execution::get_completion_signatures`](execution/get_completion_signatures.md.nolink) | 完了シグネチャ集合取得の問い合わせオブジェクト (customization point object) | C++26 |
87+
| [`execution::completion_signatures_of_t`](execution/completion_signatures_of_t.md) | Senderから完了シグネチャ集合を取得 (alias template) | C++26 |
8888
| [`execution::value_types_of_t`](execution/value_types_of_t.md.nolink) | Senderの値完了型を取得 (alias template) | C++26 |
8989
| [`execution::error_types_of_t`](execution/error_types_of_t.md.nolink) | Senderのエラー完了型を取得 (alias template) | C++26 |
9090
| [`execution::sends_stopped`](execution/value_types_of_t.md.nolink) | Senderが停止完了に対応するか否か (variable template) | C++26 |
@@ -142,7 +142,7 @@ Senderコンシューマは名前空間 `std::this_thread` で定義される。
142142
143143
| 名前 | 説明 | 対応バージョン |
144144
|------|------|----------------|
145-
| [`execution::completion_signatures`](execution/completion_signatures.md.nolink) | 完了シグネチャ (class template) | C++26 |
145+
| [`execution::completion_signatures`](execution/completion_signatures.md) | 完了シグネチャ集合を表現する型 (class template) | C++26 |
146146
| [`execution::transform_completion_signatures`](execution/transform_completion_signatures.md.nolink) | 完了シグネチャを変換 (alias template) | C++26 |
147147
| [`execution::transform_completion_signatures_of`](execution/transform_completion_signatures_of.md.nolink) | 完了シグネチャを変換 (alias template) | C++26 |
148148
| [`execution::run_loop`](execution/run_loop.md.nolink) | 実行ループ (class) | C++26 |
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# completion_signatures
2+
* execution[meta header]
3+
* class template[meta id-type]
4+
* std::execution[meta namespace]
5+
* cpp26[meta cpp]
6+
7+
```cpp
8+
namespace std::execution {
9+
template<completion-signature... Fns>
10+
struct completion_signatures {};
11+
}
12+
```
13+
14+
## 概要
15+
`completion_signatures`クラステンプレートは、完了シグネチャの集合をテンプレートパラメータとして表現する。
16+
17+
18+
## テンプレートパラメータ制約
19+
`Fns`の各要素`Fn`が、下記の説明専用コンセプト`completion-signature`を満たすこと。
20+
21+
```cpp
22+
template<class Fn>
23+
concept completion-signature = see below;
24+
```
25+
* see below[italic]
26+
27+
`Fn`が下記いずれかを満たす関数型であるとき、`Fn`はコンセプト`completion-signature`を満たす。
28+
- `set_value_t(Vs...)``Vs`はオブジェクト型または参照型のパック)
29+
- `set_error_t(Err)``Err`はオブジェクト型または参照型)
30+
- `set_stopped_t()`
31+
32+
33+
##
34+
```cpp example
35+
#include <execution>
36+
namespace ex = std::execution;
37+
38+
int main()
39+
{
40+
// 下記の完了操作をサポートする
41+
// 値完了 ex::set_value(int), ex::set_value(int, int)
42+
// エラー完了 ex::set_error(std::exception_ptr)
43+
// 停止完了 ex::set_stopped()
44+
using Sigs = ex::completion_signatures<
45+
ex::set_value_t(int),
46+
ex::set_value_t(int, int),
47+
ex::set_error_t(std::exception_ptr),
48+
ex::set_stopped_t()
49+
>;
50+
}
51+
```
52+
* ex::completion_signatures[color ff0000]
53+
* std::exception_ptr[link /reference/exception/exception_ptr.md]
54+
55+
### 出力
56+
```
57+
```
58+
59+
60+
## バージョン
61+
### 言語
62+
- C++26
63+
64+
### 処理系
65+
- [Clang](/implementation.md#clang): ??
66+
- [GCC](/implementation.md#gcc): ??
67+
- [ICC](/implementation.md#icc): ??
68+
- [Visual C++](/implementation.md#visual_cpp): ??
69+
70+
71+
## 関連項目
72+
- [`execution::receiver`](receiver.md)
73+
74+
75+
## 参照
76+
- [P2300R10 `std::execution`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2300r10.html)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# completion_signatures_of_t
2+
* execution[meta header]
3+
* std::execution[meta namespace]
4+
* type-alias[meta id-type]
5+
* cpp26[meta cpp]
6+
7+
```cpp
8+
namespace std::execution {
9+
template<class Sndr, class Env = env<>>
10+
requires sender_in<Sndr, Env>
11+
using completion_signatures_of_t = call-result-t<get_completion_signatures_t, Sndr, Env>;
12+
}
13+
```
14+
* env<>[link env.md.nolink]
15+
* sender_in[link sender_in.md]
16+
* call-result-t[link call-result-t.md.nolink]
17+
* sender_in[link sender_in.md]
18+
19+
## 概要
20+
21+
[Sender型](sender.md)`Sndr`から[環境](env.md.nolink)`Env`における[完了シグネチャ集合](completion_signatures.md)を取得する。
22+
23+
24+
## バージョン
25+
### 言語
26+
- C++26
27+
28+
### 処理系
29+
- [Clang](/implementation.md#clang): ??
30+
- [GCC](/implementation.md#gcc): ??
31+
- [ICC](/implementation.md#icc): ??
32+
- [Visual C++](/implementation.md#visual_cpp): ??
33+
34+
35+
## 参照
36+
- [P2300R10 `std::execution`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2300r10.html)

reference/execution/execution/receiver_of.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace std::execution {
1212
```
1313
1414
## 概要
15-
`receiver_of`は、[Receiver型](receiver.md)`Rcvr`が完了シグネチャの集合`Completions`に適合することを表すコンセプトである。
15+
`receiver_of`は、[Receiver型](receiver.md)`Rcvr`が[完了シグネチャ集合](completion_signatures.md)`Completions`に適合することを表すコンセプトである。
1616
1717
1818
## 要件
@@ -35,7 +35,7 @@ concept has-completions =
3535
};
3636
```
3737
* callable[link /reference/functional/callable.md.nolink]
38-
* completion_signatures[link completion_signatures.md.nolink]
38+
* completion_signatures[link completion_signatures.md]
3939

4040
`receiver_of`コンセプトは、以下のように定義される。
4141

@@ -70,7 +70,7 @@ int main()
7070
}
7171
```
7272
* ex::receiver_of[color ff0000]
73-
* ex::completion_signatures[link completion_signatures.md.nolink]
73+
* ex::completion_signatures[link completion_signatures.md]
7474

7575
### 出力
7676
```

reference/execution/execution/sender_in.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace std::execution {
2929
## モデル
3030
説明用に`sndr`を`decltype((sndr))`が`Sndr`型となる式、`rcvr`を環境`Env`に関連付けられた[Receiver](receiver.md)とする。
3131
32-
また、ある完了操作の完了シグネチャが[`completion_signatures_of_t`](completion_signatures_of_t.md.nolink)`<Sndr, Env>`で取得される[`completion_signatures`](completion_signatures.md.nolink)リストに含まれるとき、`Sndr`と`Env`における許容可能完了(permissible completion)となる。
32+
また、ある完了操作の完了シグネチャが[`completion_signatures_of_t`](completion_signatures_of_t.md)`<Sndr, Env>`で取得される[`completion_signatures`](completion_signatures.md)リストに含まれるとき、`Sndr`と`Env`における許容可能完了(permissible completion)となる。
3333
3434
`sndr`と`rcvr`の接続後に[Operation State](operation_state.md.nolink)を開始することで評価されうる完了操作が、全て許容可能完了(permissible completion)である場合、`Sndr`と`Env`は`sender_in<Sndr, Env>`のモデルとなる。
3535

reference/execution/execution/sender_to.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace std::execution {
1818
* sender_in[link sender_in.md]
1919
* env_of_t[link env_of_t.md.nolink]
2020
* receiver_of[link receiver_of.md]
21-
* completion_signatures_of_t[link completion_signatures_of_t.md.nolink]
21+
* completion_signatures_of_t[link completion_signatures_of_t.md]
2222
* connect[link connect.md.nolink]
2323
2424
## 概要

0 commit comments

Comments
 (0)