Skip to content

Commit 9435551

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent 010d4ae commit 9435551

File tree

4 files changed

+34
-158
lines changed

4 files changed

+34
-158
lines changed

lang/cpp11/extern_template.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@
188188

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2024-07-08T07:33:21">
192-
2024年07月08日 07時33分21秒
191+
<span itemprop="datePublished" content="2025-05-09T13:10:11">
192+
2025年05月09日 13時10分11秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
@@ -260,7 +260,7 @@ <h2>概要</h2>
260260
<p>このように、同じテンプレート引数を指定するユーザーが複数の翻訳単位にいる場合、ひとつの翻訳単位だけがテンプレートをインスタンス化し、ほかの翻訳単位は<code>extern template</code>を使用して「テンプレートをインスタンス化しない」と指示することで、テンプレートのインスタンスがひとつで済むようになる。<code>extern template</code>を指定した翻訳単位では、そのテンプレートをインスタンス化はしないが、参照はできる。</p>
261261
<h2>仕様</h2>
262262
<ul>
263-
<li><code>extern template</code>ディレクトティブがひとつの翻訳単位で現れた場合、他のいずれかの翻訳単位、もしくは同じ翻訳単位の<code>extern template</code>指定後に、そのエンティティをインスタンス化しなければならない。そのエンティティがインスタンス化されない場合、プログラムは<a class="cpprefjp-defined-word" data-desc="プログラムが適格でないこと。コンパイルエラーなどになる" href="../../implementation-compliance.html#dfn-ill-formed">不適格</a>となる</li>
263+
<li><code>extern template</code>ディレクティブがひとつの翻訳単位で現れた場合、他のいずれかの翻訳単位、もしくは同じ翻訳単位の<code>extern template</code>指定後に、そのエンティティをインスタンス化しなければならない。そのエンティティがインスタンス化されない場合、プログラムは<a class="cpprefjp-defined-word" data-desc="プログラムが適格でないこと。コンパイルエラーなどになる" href="../../implementation-compliance.html#dfn-ill-formed">不適格</a>となる</li>
264264
</ul>
265265
<h2>参照</h2>
266266
<ul>

reference/chrono/make24.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ <h2>例</h2>
239239
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">,</span> <span class="nb">false</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">0h</a></span><span class="p">);</span>
240240

241241
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">);</span>
242-
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">1h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1u</span><span class="n">JMfOXFAiRvAsmUFWFwEsJIdFbqGVcQy</span><span class="p">);</span>
242+
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">1h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="n"><a href="duration/op_h.html">3h</a></span><span class="p">);</span>
243243
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">3h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">15h</a></span><span class="p">);</span>
244244
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">11h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">23h</a></span><span class="p">);</span>
245245
<span class="p">}</span>

rss.xml

Lines changed: 29 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,37 @@
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">&lt;pre&gt;&lt;code&gt;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+
&lt;/code&gt;&lt;/pre&gt;</summary>
29+
30+
<author>
31+
<name>Akira Takahashi</name>
32+
<email>[email protected]</email>
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">&lt;pre&gt;&lt;code&gt;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-
&lt;/code&gt;&lt;/pre&gt;</summary>
6704-
6705-
<author>
6706-
<name>yoh</name>
6707-
<email>[email protected]</email>
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">&lt;pre&gt;&lt;code&gt;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&amp;lt;&amp;gt;
6753-
+ struct impls-for&amp;lt;decayed-typeof&amp;lt;read_env&amp;gt;&amp;gt; : default-impls {
6754-
+ static constexpr auto start =
6755-
+ [](auto query, auto&amp;amp; rcvr) noexcept -&amp;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 &amp;lt;print&amp;gt;
6774-
+#include &amp;lt;execution&amp;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) -&amp;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(&amp;#34;{}&amp;#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-
&lt;/code&gt;&lt;/pre&gt;</summary>
6819-
6820-
<author>
6821-
<name>yoh</name>
6822-
<email>[email protected]</email>
6823-
</author>
6824-
</entry>
6825-
68266702
</feed>

sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37880,7 +37880,7 @@
3788037880

3788137881
<url>
3788237882
<loc>https://cpprefjp.github.io/lang/cpp11/extern_template.html</loc>
37883-
<lastmod>2025-04-03T12:32:11+09:00</lastmod>
37883+
<lastmod>2025-05-09T22:10:11+09:00</lastmod>
3788437884
<changefreq>daily</changefreq>
3788537885
<priority>0.7</priority>
3788637886
</url>

0 commit comments

Comments
 (0)