Misleading compile error for start_detached when not included
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- cpp
調査の方向性
include-issue.cppを、g++をC++20モードで使用し、示されているstdexec/execution.hpp includeを指定して診断を再現します。stdexec/execution.hppによって公開される宣言をexec/start_detached.hppと比較し、報告されたエラーまたはヘッダーの可視性が意図しないものかどうかを判断します。期待されるincludeの動作と診断が回帰テストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I am not sure if this is an issue that should be fixed
For the following code, im not including <exec/start_detached.hpp> for calling exec::start_detached:
#include <stdexec/execution.hpp>
// missing include file
// #include <exec/start_detached.hpp>
void do_some_work() {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
int main() {
auto work = stdexec::just() | stdexec::then([] {
do_some_work();
});
exec::start_detached(std::move(work));
std::this_thread::sleep_for(std::chrono::seconds(1));
return 0;
}
and the compiler gives error:
-> % g++ ./include-issue.cpp -I/some/random/path/stdexec/include -std=c++20 -ltbb
./include-issue.cpp: In function ‘int main()’:
./include-issue.cpp:14:25: error: no match for call to ‘(const experimental::execution::start_detached_t) (std::remove_reference<stdexec::{anonymous}::__sexpr<<lambda closure object>stdexec::<lambda()>()>&>::type)’
14 | exec::start_detached(std::move(work));
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
- it's a bit misleading the compiler reporting "no match call" instead of "not defined", there might be a forward declarations seen by compiler
- given that im only including files under
stdexec, seeing forward declarations fromexecmight not be an expected behavior?
- 主要言語
- C++
- スター
- 2.4k
- フォーク
- 270
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 42
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- 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時間 初心者へのやさしさ 86/100
ArthurSonzogni/FTXUI#1363 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ginkgo-project/ginkgo#2108 ·
-
bug build
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW オープンfuzz
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ClickHouse/ClickHouse#122114 ·