22<feed xmlns =" http://www.w3.org/2005/Atom" >
33 <title >cpprefjp - C++日本語リファレンス</title >
44 <link href =" https://cpprefjp.github.io" />
5- <updated >2025-05-09T07:21:34.556227 </updated >
6- <id >34fa0283-b760-4fa7-9acd-18e166e4812b </id >
5+ <updated >2025-05-09T13:13:54.614416 </updated >
6+ <id >db55807a-6951-433d-9737-a56f5e4d6d39 </id >
77
88
9+ <entry >
10+ <title >extern template [N1987] -- fix typo: ディレクトティブ → ディレクティブ</title >
11+ <link href =" https://cpprefjp.github.io/lang/cpp11/extern_template.html" />
12+ <id >a2c9f2ffd68c10ddf59cb6fcb81eeaf73534f92f:lang/cpp11/extern_template.md</id >
13+ <updated >2025-05-09T22:10:11+09:00</updated >
14+
15+ <summary type =" html" >< pre>< code> diff --git a/lang/cpp11/extern_template.md b/lang/cpp11/extern_template.md
16+ index e62ec385d..7bedc9cd9 100644
17+ --- a/lang/cpp11/extern_template.md
18+ +++ b/lang/cpp11/extern_template.md
19+ @@ -58,7 +58,7 @@ void user2()
20+
21+
22+ ## 仕様
23+ -- `extern template`ディレクトティブがひとつの翻訳単位で現れた場合、他のいずれかの翻訳単位、もしくは同じ翻訳単位の`extern template`指定後に、そのエンティティをインスタンス化しなければならない。そのエンティティがインスタンス化されない場合、プログラムは不適格となる
24+ +- `extern template`ディレクティブがひとつの翻訳単位で現れた場合、他のいずれかの翻訳単位、もしくは同じ翻訳単位の`extern template`指定後に、そのエンティティをインスタンス化しなければならない。そのエンティティがインスタンス化されない場合、プログラムは不適格となる
25+
26+
27+ ## 参照
28+ < /code>< /pre> </summary >
29+
30+ <author >
31+ <name >Akira Takahashi</name >
32+ 33+ </author >
34+ </entry >
35+
936 <entry >
1037 <title >コンパイラの実装状況 -- コンパイラの実装状況 : Clang 20対応</title >
1138 <link href =" https://cpprefjp.github.io/implementation-status.html" />
@@ -6672,155 +6699,4 @@ index 000000000..6e3c9ecc0
66726699 </author >
66736700 </entry >
66746701
6675- <entry >
6676- <title >execution -- execution: read_env (#1384)</title >
6677- <link href =" https://cpprefjp.github.io/reference/execution/execution.html" />
6678- <id >b8c7c50fec35db39373dc7b8e006cf05362ce622:reference/execution/execution.md</id >
6679- <updated >2025-05-08T17:49:46+09:00</updated >
6680-
6681- <summary type =" html" >< pre>< code> diff --git a/reference/execution/execution.md b/reference/execution/execution.md
6682- index 631483cb2..3bdb0796d 100644
6683- --- a/reference/execution/execution.md
6684- +++ b/reference/execution/execution.md
6685- @@ -88,7 +88,7 @@ namespace std::execution {
6686- | [`execution::value_types_of_t`](execution/value_types_of_t.md) | Senderの値完了シグネチャ集合から指定操作で型を生成 (alias template) | C++26 |
6687- | [`execution::error_types_of_t`](execution/error_types_of_t.md) | Senderのエラー完了シグネチャ集合から指定操作で型を生成 (alias template) | C++26 |
6688- | [`execution::sends_stopped`](execution/sends_stopped.md) | Senderが停止完了を送信しうるか否か (variable template) | C++26 |
6689- -| [`execution::tag_of_t`](execution/tag_of_t.md) | Senderアルゴリズムタグを取得 (alias template) | C++26 |
6690- +| [`execution::tag_of_t`](execution/tag_of_t.md) | Senderアルゴリズムタグ型を取得 (alias template) | C++26 |
6691- | [`execution::transform_sender`](execution/transform_sender.md) | Senderを変換 (function template) | C++26 |
6692- | [`execution::transform_env`](execution/transform_env.md) | 環境を変換 (function template) | C++26 |
6693- | [`execution::apply_sender`](execution/apply_sender.md) | Senderアルゴリズムを適用 (function template) | C++26 |
6694- @@ -102,7 +102,7 @@ namespace std::execution {
6695- | [`execution::just`](execution/just.md) | 値を送信するSender (customization point object) | C++26 |
6696- | [`execution::just_error`](execution/just_error.md.nolink) | エラーを送信するSender (customization point object) | C++26 |
6697- | [`execution::just_stopped`](execution/just_stopped.md.nolink) | 停止を送信するSender (customization point object) | C++26 |
6698- -| [`execution::read_env`](execution/read_env.md.nolink) | Receiver環境から構築されるSender (customization point object) | C++26 |
6699- +| [`execution::read_env`](execution/read_env.md) | Receiver環境からクエリオブジェクトで値を読み取るSender (customization point object) | C++26 |
6700- | [`execution::schedule`](execution/schedule.md) | Scheduler上で実行されるSender (customization point object) | C++26 |
6701- | [`execution::schedule_result_t`](execution/schedule_result_t.md) | [`schedule`](execution/schedule.md)結果型を取得 (alias template) | C++26 |
6702-
6703- < /code>< /pre> </summary >
6704-
6705- <author >
6706- <name >yoh</name >
6707- 6708- </author >
6709- </entry >
6710-
6711- <entry >
6712- <title >read_env -- execution: read_env (#1384)</title >
6713- <link href =" https://cpprefjp.github.io/reference/execution/execution/read_env.html" />
6714- <id >b8c7c50fec35db39373dc7b8e006cf05362ce622:reference/execution/execution/read_env.md</id >
6715- <updated >2025-05-08T17:49:46+09:00</updated >
6716-
6717- <summary type =" html" >< pre>< code> diff --git a/reference/execution/execution/read_env.md b/reference/execution/execution/read_env.md
6718- new file mode 100644
6719- index 000000000..41e98e7f8
6720- --- /dev/null
6721- +++ b/reference/execution/execution/read_env.md
6722- @@ -0,0 +1,94 @@
6723- +# read_env
6724- +* execution[meta header]
6725- +* cpo[meta id-type]
6726- +* std::execution[meta namespace]
6727- +* cpp26[meta cpp]
6728- +
6729- +```cpp
6730- +namespace std::execution {
6731- + inline constexpr unspecified read_env{};
6732- +}
6733- +```
6734- +* unspecified[italic]
6735- +
6736- +## 概要
6737- +`read_env`は、非同期動作の[開始(start)](start.md)時に接続先[Receiver](receiver.md)の[環境](../queryable.md)に対して[クエリオブジェクト](../queryable.md)で問い合わせ、読み取った値を[値完了関数](set_value.md)で送信するSenderファクトリである。
6738- +
6739- +クエリオブジェクトによるReceiver環境への問い合わせは`read_env`[Sender](sender.md)の構築時ではなく、Receiverと接続されたのち非同期動作が開始されるタイミングまで遅延される。
6740- +[`let_value`](let_value.md.nolink)Senderアダプタと組み合わせたり、[Sender Awaitableなコルーチン](with_awaitable_senders.md.nolink)での`co_await`式によって、[Scheduler](get_scheduler.md)や[停止トークン](../get_stop_token.md)を読み取ることができる。
6741- +
6742- +
6743- +## 効果
6744- +[クエリオブジェクト](../queryable.md)`q`に対して、呼び出し式`read_env(q)`は式[`make-sender`](make-sender.md)`(read_env, q)`と等価。
6745- +
6746- +
6747- +### Senderアルゴリズムタグ
6748- +Senderアルゴリズム動作説明用のクラステンプレート`impls-for`に対して、下記の特殊化が定義される。
6749- +
6750- +```cpp
6751- +namespace std::execution {
6752- + template& lt;& gt;
6753- + struct impls-for& lt;decayed-typeof& lt;read_env& gt;& gt; : default-impls {
6754- + static constexpr auto start =
6755- + [](auto query, auto& amp; rcvr) noexcept -& gt; void {
6756- + TRY-SET-VALUE(rcvr, query(get_env(rcvr)));
6757- + };
6758- + };
6759- +}
6760- +```
6761- +* decayed-typeof[link decayed-typeof.md.nolink]
6762- +* impls-for[link impls-for.md]
6763- +* default-impls[link impls-for.md]
6764- +* get_env[link get_env.md]
6765- +
6766- +
6767- +## 備考
6768- +`read_env`の[Senderアルゴリズムタグ型](tag_of_t.md)は未規定とされる。
6769- +
6770- +
6771- +## 例
6772- +```cpp example
6773- +#include & lt;print& gt;
6774- +#include & lt;execution& gt;
6775- +namespace ex = std::execution;
6776- +
6777- +int main()
6778- +{
6779- + ex::sender auto sndr = ex::read_env(ex::get_scheduler)
6780- + | ex::let_value([](auto sch) -& gt; ex::sender auto {
6781- + // sch := sync_wait内部のScheduler
6782- + return ex::starts_on(sch, std::just(42));
6783- + });
6784- + auto [val] = std::this_thread::sync_wait(sndr).value();
6785- + std::println(& #34;{}& #34;, val);
6786- +}
6787- +```
6788- +* ex::read_env[color ff0000]
6789- +* ex::sender[link sender.md]
6790- +* ex::get_scheduler[link get_scheduler.md]
6791- +* ex::starts_on[link starts_on.md.nolink]
6792- +* std::this_thread::sync_wait[link ../this_thread/sync_wait.md]
6793- +
6794- +### 出力
6795- +```
6796- +42
6797- +```
6798- +
6799- +
6800- +## バージョン
6801- +### 言語
6802- +- C++26
6803- +
6804- +### 処理系
6805- +- [Clang](/implementation.md#clang): ??
6806- +- [GCC](/implementation.md#gcc): ??
6807- +- [ICC](/implementation.md#icc): ??
6808- +- [Visual C++](/implementation.md#visual_cpp): ??
6809- +
6810- +
6811- +## 関連項目
6812- +- [`execution::get_env`](read_env.md)
6813- +
6814- +
6815- +## 参照
6816- +- [P2300R10 `std::execution`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2300r10.html)
6817- \ No newline at end of file
6818- < /code>< /pre> </summary >
6819-
6820- <author >
6821- <name >yoh</name >
6822- 6823- </author >
6824- </entry >
6825-
68266702</feed >
0 commit comments