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-15T04:14:23.014019 </updated>
6- <id>130afdee-487f-434e-afc3-a0330108c301 </id>
5+ <updated>2025-04-15T05:16:09.620540 </updated>
6+ <id>52b184a8-4538-463b-9acc-9c3e2f6e412e </id>
77
88
99 <entry>
@@ -1475,117 +1475,4 @@ index ed10d259b..86ed8088d 100644
14751475 </author>
14761476 </entry>
14771477
1478- <entry>
1479- <title>sender -- execution: is-awaitable (#1384)</title>
1480- <link href="https://cpprefjp.github.io/reference/execution/execution/sender.html"/>
1481- <id>c22f5566bef585080db7bde797aa85e25ba1e413:reference/execution/execution/sender.md</id>
1482- <updated>2025-04-14T22:11:13+09:00</updated>
1483-
1484- <summary type="html"><pre><code>diff --git a/reference/execution/execution/sender.md b/reference/execution/execution/sender.md
1485- index 671e7c6cc..19c77f609 100644
1486- --- a/reference/execution/execution/sender.md
1487- +++ b/reference/execution/execution/sender.md
1488- @@ -47,7 +47,7 @@ struct env-promise : with-await-transform&lt;env-promise&lt;Env&gt;&gt; {
1489- const Env&amp; get_env() const noexcept;
1490- };
1491- ```
1492- -* is-awaitable[link is-awaitable.md.nolink]
1493- +* is-awaitable[link ../is-awaitable.md]
1494- * env&lt;&gt;[link env.md.nolink]
1495- * derived_from[link /reference/concepts/derived_from.md]
1496- * coroutine_handle&lt;&gt;[link /reference/coroutine/coroutine_handle.md]
1497- </code></pre></summary>
1498-
1499- <author>
1500- <name>yoh</name>
1501- <email>kawasaki.liamg@gmail.com</email>
1502- </author>
1503- </entry>
1504-
1505- <entry>
1506- <title>is-awaitable -- execution: is-awaitable (#1384)</title>
1507- <link href="https://cpprefjp.github.io/reference/execution/is-awaitable.html"/>
1508- <id>c22f5566bef585080db7bde797aa85e25ba1e413:reference/execution/is-awaitable.md</id>
1509- <updated>2025-04-14T22:11:13+09:00</updated>
1510-
1511- <summary type="html"><pre><code>diff --git a/reference/execution/is-awaitable.md b/reference/execution/is-awaitable.md
1512- new file mode 100644
1513- index 000000000..c5cd3bec2
1514- --- /dev/null
1515- +++ b/reference/execution/is-awaitable.md
1516- @@ -0,0 +1,66 @@
1517- +# is-awaitable
1518- +* execution[meta header]
1519- +* concept[meta id-type]
1520- +* std[meta namespace]
1521- +* cpp26[meta cpp]
1522- +
1523- +```cpp
1524- +template&lt;class C, class Promise&gt;
1525- +concept is-awaitable;
1526- +```
1527- +
1528- +## 概要
1529- +`is-awaitable`は、Promise型をもつ[コルーチンのco_await演算子](/lang/cpp20/coroutines.md)オペランドにおいて`C`型オブジェクトが妥当であることを表す説明専用コンセプトである。
1530- +
1531- +
1532- +## 要件
1533- +説明用の式`GET-AWAITER(c, p)`を、Promise型`p`をもつコルーチン内の`co_await`演算子オペランドに適用される一連変換後の左辺値とする。
1534- +
1535- +- (有効ならば)Promise型の`await_transform`メンバ関数を適用
1536- +- (有効ならば)`co_await`演算子オーバーロードを適用
1537- +
1538- +また、説明用のコンセプト`await-suspend-result`, `is-awaiter`を以下のように定義する。
1539- +
1540- +```cpp
1541- +template&lt;class T&gt;
1542- +concept await-suspend-result = /*see below*/;
1543- +
1544- +template&lt;class A, class Promise&gt;
1545- +concept is-awaiter =
1546- + requires (A&amp; a, coroutine_handle&lt;Promise&gt; h) {
1547- + a.await_ready() ? 1 : 0;
1548- + { a.await_suspend(h) } -&gt; await-suspend-result;
1549- + a.await_resume();
1550- + };
1551- +```
1552- +* coroutine_handle[link /reference/coroutine/coroutine_handle.md]
1553- +
1554- +下記いずれかのうち1つが`true`のとき、`await-suspend-result&lt;T&gt;`は`true`となる。
1555- +
1556- +- `T`が`void`、もしくは
1557- +- `T`が`bool`、もしくは
1558- +- `T`が[`coroutine_handle`](/reference/coroutine/coroutine_handle.md)の特殊化
1559- +
1560- +`is-awaitable`コンセプトは、以下のように定義される。
1561- +
1562- +```cpp
1563- +template&lt;class C, class Promise&gt;
1564- +concept is-awaitable =
1565- + requires (C (*fc)() noexcept, Promise&amp; p) {
1566- + { GET-AWAITER(fc(), p) } -&gt; is-awaiter&lt;Promise&gt;;
1567- + };
1568- +```
1569- +* GET-AWAITER[italic]
1570- +
1571- +
1572- +## バージョン
1573- +### 言語
1574- +- C++26
1575- +
1576- +
1577- +## 関連項目
1578- +- [コルーチン](/lang/cpp20/coroutines.md)
1579- +
1580- +
1581- +## 参照
1582- +- [P2300R10 `std::execution`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2300r10.html)
1583- </code></pre></summary>
1584-
1585- <author>
1586- <name>yoh</name>
1587- <email>kawasaki.liamg@gmail.com</email>
1588- </author>
1589- </entry>
1590-
15911478</feed>
0 commit comments