Skip to content

Commit c887692

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent 6c5f029 commit c887692

File tree

3 files changed

+46
-197
lines changed

3 files changed

+46
-197
lines changed

reference/iterator/contiguous_iterator.html

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

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2024-06-11T13:45:38">
192-
2024年06月11日 13時45分38秒
191+
<span itemprop="datePublished" content="2025-04-20T13:01:25">
192+
2025年04月20日 13時01分25秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
196-
<span itemprop="name">Akira Takahashi</span>
196+
<span itemprop="name">rotarymars</span>
197197
</span>
198198
が更新
199199
</small></p>
@@ -229,6 +229,9 @@
229229
<h2>概要</h2>
230230
<p><code>contiguous_iterator</code>は、イテレータ型<code>I</code>が隣接イテレータであることを表すコンセプトである。</p>
231231
<p><code>contiguous_iterator</code>となるイテレータは、<a href="random_access_iterator.html">ランダムアクセスイテレータ</a>であり、参照する要素列がメモリ上で連続していることが保証される。</p>
232+
<p>C++20で導入された<code>contiguous_iterator</code>は、要素がメモリー上で連続していることを保証しているが、C++23の標準ライブラリ実装では
233+
得られたポインタに対してさらなるポインタ演算を行う演算は許可されていなかった。</p>
234+
<p>しかし、C++26からは、この制限が緩和され、<code>std::to_address</code>関数を使用して得られたポインタに対してさらなるポインタ演算を行うことができるようになった。</p>
232235
<h2>モデル</h2>
233236
<p><code>a, b</code>を間接参照可能なイテレータ、<code>c</code>を間接参照不可能なイテレータとし、<code>b</code><code>a</code>から、<code>c</code><code>b</code>からそれぞれ到達可能であるとする。そのような型<code>I</code>のイテレータ<code>a, b, c</code><code><a href="iter_difference_t.html">iter_difference_t&lt;I&gt;</a></code>の示す型<code>D</code>について次の条件を満たす場合に限って、型<code>I</code><code>contiguous_iterator</code>のモデルである。</p>
234237
<ul>
@@ -301,6 +304,7 @@ <h2>参照</h2>
301304
<ul>
302305
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0896r4.pdf" target="_blank">P0896R4 The One Ranges Proposal (was Merging the Ranges TS)</a></li>
303306
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1474r1.pdf" target="_blank">P1474R1 Helpful pointers for <code>ContiguousIterator</code></a></li>
307+
<li><a href="https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3349r1.html" target="_blank">P3349R1 Converting contiguous iterators to pointers</a></li>
304308
</ul></div>
305309

306310
</div>

rss.xml

Lines changed: 38 additions & 193 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,46 @@
22
<feed xmlns="http://www.w3.org/2005/Atom">
33
<title>cpprefjp - C++日本語リファレンス</title>
44
<link href="https://cpprefjp.github.io" />
5-
<updated>2025-04-20T05:53:54.449233</updated>
6-
<id>972e2dee-741d-4631-aa5e-10f3aefb81e9</id>
5+
<updated>2025-04-20T13:05:41.745375</updated>
6+
<id>b1bcf444-6e70-49a9-a3a7-87b9c9d493b6</id>
77

88

9+
<entry>
10+
<title>contiguous_iterator -- reference/iterator/contiguous_iterator.md: Added information for contiguous_iterator</title>
11+
<link href="https://cpprefjp.github.io/reference/iterator/contiguous_iterator.html"/>
12+
<id>28659acd4e63cb13d247b9bb147b7539c043f0a6:reference/iterator/contiguous_iterator.md</id>
13+
<updated>2025-04-20T22:01:25+09:00</updated>
14+
15+
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/iterator/contiguous_iterator.md b/reference/iterator/contiguous_iterator.md
16+
index 712c3e7a7..5a16cc318 100644
17+
--- a/reference/iterator/contiguous_iterator.md
18+
+++ b/reference/iterator/contiguous_iterator.md
19+
@@ -33,6 +33,11 @@ namespace std {
20+
21+
`contiguous_iterator`となるイテレータは、[ランダムアクセスイテレータ](random_access_iterator.md)であり、参照する要素列がメモリ上で連続していることが保証される。
22+
23+
+C++20で導入された`contiguous_iterator`は、要素がメモリー上で連続していることを保証しているが、C++23の標準ライブラリ実装では
24+
+得られたポインタに対してさらなるポインタ演算を行う演算は許可されていなかった。
25+
+
26+
+しかし、C++26からは、この制限が緩和され、`std::to_address`関数を使用して得られたポインタに対してさらなるポインタ演算を行うことができるようになった。
27+
+
28+
## モデル
29+
30+
`a, b`を間接参照可能なイテレータ、`c`を間接参照不可能なイテレータとし、`b`は`a`から、`c`は`b`からそれぞれ到達可能であるとする。そのような型`I`のイテレータ`a, b, c`と[`iter_difference_t&amp;lt;I&amp;gt;`](/reference/iterator/iter_difference_t.md)の示す型`D`について次の条件を満たす場合に限って、型`I`は`contiguous_iterator`のモデルである。
31+
@@ -109,3 +114,4 @@ std::ostream_iterator&amp;lt;double&amp;gt; is not contiguous_iterator
32+
33+
- [P0896R4 The One Ranges Proposal (was Merging the Ranges TS)](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0896r4.pdf)
34+
- [P1474R1 Helpful pointers for `ContiguousIterator`](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1474r1.pdf)
35+
+- [P3349R1 Converting contiguous iterators to pointers](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3349r1.html)
36+
\ No newline at end of file
37+
&lt;/code&gt;&lt;/pre&gt;</summary>
38+
39+
<author>
40+
<name>rotarymars</name>
41+
<email>s.goto2050@gmail.com</email>
42+
</author>
43+
</entry>
44+
945
<entry>
1046
<title>constexpr ラムダ [P0170R1] -- 「定数とき」→「定数のとき」</title>
1147
<link href="https://cpprefjp.github.io/lang/cpp17/constexpr_lambda.html"/>
@@ -387,197 +423,6 @@ index 0e2fd7e19..27ef5307c 100644
387423

388424
Scheduler型のデストラクタは、`schedule`が返すSenderオブジェクトに接続されたReceiverの完了を待機してブロックしてはならない。
389425

390-
&lt;/code&gt;&lt;/pre&gt;</summary>
391-
392-
<author>
393-
<name>yoh</name>
394-
<email>kawasaki.liamg@gmail.com</email>
395-
</author>
396-
</entry>
397-
398-
<entry>
399-
<title>receiver -- execution/scheduler: refinement (#1384)</title>
400-
<link href="https://cpprefjp.github.io/reference/execution/execution/receiver.html"/>
401-
<id>ac9fa1d4237d0b4afacde0c24b5b884195b79dcf:reference/execution/execution/receiver.md</id>
402-
<updated>2025-04-19T21:41:34+09:00</updated>
403-
404-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/receiver.md b/reference/execution/execution/receiver.md
405-
index 8cd67b2e6..05a15160f 100644
406-
--- a/reference/execution/execution/receiver.md
407-
+++ b/reference/execution/execution/receiver.md
408-
@@ -27,7 +27,11 @@ namespace std::execution {
409-
## 概要
410-
`receiver`は、型`Rcvr`がReceiver型の要件を満たすことを表すコンセプトである。
411-
412-
-`receiver_t`をメンバ型`Rcvr::receiver_concept`として定義するクラス型はReceiverとみなせる。
413-
+下記をみたすクラス型はReceiverとみなせる。
414-
+
415-
+- `receiver_t`をメンバ型`Rcvr::receiver_concept`として定義する
416-
+- [`get_env`](get_env.md)で[環境](../queryable.md)を取得できる
417-
+- ムーブ可能
418-
419-
420-
## モデル
421-
&lt;/code&gt;&lt;/pre&gt;</summary>
422-
423-
<author>
424-
<name>yoh</name>
425-
<email>kawasaki.liamg@gmail.com</email>
426-
</author>
427-
</entry>
428-
429-
<entry>
430-
<title>scheduler -- execution/scheduler: refinement (#1384)</title>
431-
<link href="https://cpprefjp.github.io/reference/execution/execution/scheduler.html"/>
432-
<id>ac9fa1d4237d0b4afacde0c24b5b884195b79dcf:reference/execution/execution/scheduler.md</id>
433-
<updated>2025-04-19T21:41:34+09:00</updated>
434-
435-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/scheduler.md b/reference/execution/execution/scheduler.md
436-
index 2ffa3efc0..0e2fd7e19 100644
437-
--- a/reference/execution/execution/scheduler.md
438-
+++ b/reference/execution/execution/scheduler.md
439-
@@ -25,6 +25,7 @@ namespace std::execution {
440-
* derived_from[link /reference/concepts/derived_from.md]
441-
* sender[link sender.md]
442-
* queryable[link ../queryable.md]
443-
+* schedule[link schedule.md.nolink]
444-
* get_completion_scheduler[link get_completion_scheduler.md.nolink]
445-
* set_value_t[link set_value.md]
446-
* get_env[link get_env.md]
447-
@@ -36,11 +37,47 @@ namespace std::execution {
448-
449-
下記をみたすクラス型はSchedulerとみなせる。
450-
451-
-- `scheduler_t`をメンバ型`Sch::scheduler_concept`として定義するクラス
452-
-- [クエリ可能オブジェクト](../queryable.md)であること
453-
-- `Sch`型の値`sch`に対して下記が有効な式であること
454-
- - [`execution::schedule`](schedule.md.nolink)`(sch)`が[Sender](sender.md)を返すこと
455-
- - [`execution::get_completion_scheduler`](get_completion_scheduler.md.nolink)`&amp;lt;`[`set_value_t`](set_value.md)`&amp;gt;(`[`execution::get_env`](get_env.md)`(`[`execution::schedule`](schedule.md.nolink)`(sch)))`の結果が`Sch`型に等しいこと
456-
+- `scheduler_t`をメンバ型`Sch::scheduler_concept`として定義する
457-
+- [クエリ可能オブジェクト](../queryable.md)である
458-
+- `Sch`型の値`sch`に対して下記を満たすこと
459-
+ - [`execution::schedule`](schedule.md.nolink)`(sch)`が[Sender](sender.md)を返す
460-
+ - 上記Senderの[値完了関数](set_value.md)の[完了Scheduler](get_completion_scheduler.md.nolink)が`Sch`に等しいこと
461-
+- コピー可能かつ同値比較可能
462-
+
463-
+
464-
+## モデル
465-
+説明専用のエイリアステンプレート`value-signature`, コンセプト`sender-in-of`を下記の通り定義する。
466-
+
467-
+```cpp
468-
+namespace std::execution {
469-
+ template&amp;lt;class... As&amp;gt;
470-
+ using value-signature = set_value_t(As...);
471-
+
472-
+ template&amp;lt;class Sndr, class Env, class... Values&amp;gt;
473-
+ concept sender-in-of =
474-
+ sender_in&amp;lt;Sndr, Env&amp;gt; &amp;amp;&amp;amp;
475-
+ MATCHING-SIG(
476-
+ set_value_t(Values...),
477-
+ value_types_of_t&amp;lt;Sndr, Env, value-signature, type_identity_t&amp;gt;);
478-
+}
479-
+```
480-
+* set_value_t[link set_value.md]
481-
+* sender_in[link sender_in.md]
482-
+* value_types_of_t[link value_types_of_t.md.nolink]
483-
+* type_identity_t[link /reference/type_traits/true_type.md]
484-
+
485-
+型`Sch`を`scheduler`の型、型`Env`を[`sender_in`](sender_in.md)`&amp;lt;schedule_result_t&amp;lt;Sch&amp;gt;, Env&amp;gt;`を満たす実行環境の型としたとき、`sender-in-of&amp;lt;schedule_result_t&amp;lt;Sch&amp;gt;, Env&amp;gt;`のモデルとなること。
486-
+
487-
+[`copyable`](/reference/concepts/copyable.md)`&amp;lt;remove_cvref_t&amp;lt;Sch&amp;gt;&amp;gt;`および[`equality_comparable`](/reference/concepts/equality_comparable.md)`&amp;lt;remove_cvref_t&amp;lt;Sch&amp;gt;&amp;gt;`により要求される操作は、例外で終了してはならない。
488-
+これらの操作やScheduler型の[`schedule`](schedule.md.nolink)関数は、異なるスレッドから同時に操作を呼び出す可能性がある場合でも、データ競合を引き起こしてはならない。
489-
+
490-
+あるScheduler型`Sch`の2つの値`sch1`と`sch2`に対して、`sch1`と`sch2`が同じ実行リソースを共有する場合に限って、`sch1 == sch2`は`true`となる。
491-
+
492-
+あるScheduler`sch`に対して、式[`get_completion_scheduler`](get_completion_scheduler.md.nolink)`&amp;lt;`[`set_value_t`](set_value.md)`&amp;gt;(`[`get_env`](get_env.md)`(`[`schedule`](schedule.md.nolink)`(sch)))`が`sch`と等しいこと。
493-
+
494-
+あるScheduler`sch`に対して式[`get_domain`](get_domain.md)`(sch)`が適格であるとき、式`get_domain(`[`get_env`](get_env.md)`(schedule(sch)))`も適格であり、かつ同じ型を持つ。
495-
+
496-
+Scheduler型のデストラクタは、`schedule`が返すSenderオブジェクトに接続されたReceiverの完了を待機してブロックしてはならない。
497-
498-
499-
## 例
500-
&lt;/code&gt;&lt;/pre&gt;</summary>
501-
502-
<author>
503-
<name>yoh</name>
504-
<email>kawasaki.liamg@gmail.com</email>
505-
</author>
506-
</entry>
507-
508-
<entry>
509-
<title>sender -- execution/scheduler: refinement (#1384)</title>
510-
<link href="https://cpprefjp.github.io/reference/execution/execution/sender.html"/>
511-
<id>ac9fa1d4237d0b4afacde0c24b5b884195b79dcf:reference/execution/execution/sender.md</id>
512-
<updated>2025-04-19T21:41:34+09:00</updated>
513-
514-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/sender.md b/reference/execution/execution/sender.md
515-
index 4a6f91360..a7aa146f5 100644
516-
--- a/reference/execution/execution/sender.md
517-
+++ b/reference/execution/execution/sender.md
518-
@@ -16,10 +16,13 @@ namespace std::execution {
519-
## 概要
520-
`sender`は、型`Sndr`がSender型の要件を満たすことを表すコンセプトである。
521-
522-
-次のいずれかのクラス型はSenderとみなせる。
523-
+下記をみたすクラス型はSenderとみなせる。
524-
525-
-- `sender_t`をメンバ型`Sndr::sender_concept`として定義するクラス型
526-
-- [コルーチンのAwaitable型](/lang/cpp20/coroutines.md)クラス型
527-
+- 下記いずれかを満たす
528-
+ - `sender_t`をメンバ型`Sndr::sender_concept`として定義する
529-
+ - [コルーチンのAwaitable型](/lang/cpp20/coroutines.md)
530-
+- [`get_env`](get_env.md)で[属性](../queryable.md)を取得できる
531-
+- ムーブ可能
532-
533-
534-
## 要件
535-
&lt;/code&gt;&lt;/pre&gt;</summary>
536-
537-
<author>
538-
<name>yoh</name>
539-
<email>kawasaki.liamg@gmail.com</email>
540-
</author>
541-
</entry>
542-
543-
<entry>
544-
<title>start -- execution/scheduler: refinement (#1384)</title>
545-
<link href="https://cpprefjp.github.io/reference/execution/execution/start.html"/>
546-
<id>ac9fa1d4237d0b4afacde0c24b5b884195b79dcf:reference/execution/execution/start.md</id>
547-
<updated>2025-04-19T21:41:34+09:00</updated>
548-
549-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/reference/execution/execution/start.md b/reference/execution/execution/start.md
550-
index 9c6e4c668..90fc7ed10 100644
551-
--- a/reference/execution/execution/start.md
552-
+++ b/reference/execution/execution/start.md
553-
@@ -12,14 +12,14 @@ namespace std::execution {
554-
```
555-
556-
## 概要
557-
-`start`は、[Operation State](operation_state.md)を開始するカスタマイゼーションポイントオブジェクトである。
558-
+`start`は、[Operation State](operation_state.md)関連付けられた非同期操作(asynchronous operation)を開始するカスタマイゼーションポイントオブジェクトである。
559-
560-
561-
## 効果
562-
式`start(op)`は、`op`が右辺値の場合は不適格となる。
563-
そうでなければ、`op.start()`と等価。
564-
565-
-`op.start()`が[Operation State](operation_state.md)に関連付けさられた非同期操作を開始しない場合、式`start(op)`の動作は未定義となる。
566-
+`op.start()`が[Operation State](operation_state.md)に関連付けられた非同期操作を開始しない場合、式`start(op)`の動作は未定義となる。
567-
568-
569-
## カスタマイゼーションポイント
570-
@@ -27,6 +27,10 @@ namespace std::execution {
571-
このとき`noexcept(op.start()) == true`であること。
572-
573-
574-
+## 備考
575-
+`start`は[Sender](sender.md)内部実装から呼び出される想定であり、実行制御ライブラリ利用者が直接利用する必要はない。
576-
+
577-
+
578-
## 例
579-
```cpp
580-
#include &amp;lt;print&amp;gt;
581426
&lt;/code&gt;&lt;/pre&gt;</summary>
582427

583428
<author>

sitemap.xml

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

3042630426
<url>
3042730427
<loc>https://cpprefjp.github.io/reference/iterator/contiguous_iterator.html</loc>
30428-
<lastmod>2025-04-03T12:32:11+09:00</lastmod>
30428+
<lastmod>2025-04-20T22:01:25+09:00</lastmod>
3042930429
<changefreq>daily</changefreq>
3043030430
<priority>0.7</priority>
3043130431
</url>

0 commit comments

Comments
 (0)