Helper __awaitable concept doesn't correctly handle await_transform
まだ誰も着手していません。
評価
調査の方向性
リンクされた行の __awaitable concept 付近にある include/coroutine.hpp から始め、次にそのチェックを、記載されている coroutine のセマンティクスおよび std::generator promise_type の例と比較します。宣言された await_transform メンバーを concept がどのように考慮すべきか、また必要な compiler intrinsic が利用可能かどうかを判断します。完了の条件は、concept が無効な co_await 式を awaitable として報告しなくなることです。
索引モデルが issue の本文から書いたものです。
説明
The coroutine semantics are such that if there is any member of the promise type declared as await_transform then the co_await expression inside a coroutine with that promise type will first call promise.await_transform().
The current concept just checks that the particular type being queried is callable with promise.await_transform(<expr>) and if that is not well-formed then it falls back to just checking if <expr> has a valid operator co_await().
This could result in incorrectly reporting that a type satisfies __awaitable<Promise> when a co_await expression with an operand of that type would be ill-formed.
e.g. The current logic would indicate that std::suspend_always satisfies the __awaitable<std::generator<int>::promise_type> concept, despite co_await expressions being ill-formed inside std::generator coroutines.
Note that it's not currently possible to exactly match the behaviour of the compiler in library alone.
There would need to be some intrinsic for asking the compiler whether a given promise type has any member named 'await_transform' declared.
- 主要言語
- C++
- スター
- 2.4k
- フォーク
- 270
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 43
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/stdexec のほかの issue
-
inline_scheduler's namespace-scope static_assert fails under nvcc (private nested __sender access) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
duckdb/duckdb-wasm#2258 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend オープンcoarray
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·