Misleading compile error for start_detached when not included
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- cpp
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
Tái hiện chẩn đoán với include-issue.cpp bằng cách sử dụng g++ ở chế độ C++20 và include stdexec/execution.hpp được nêu. So sánh các khai báo được stdexec/execution.hpp cung cấp với exec/start_detached.hpp và xác định xem lỗi được báo cáo hoặc khả năng hiển thị của header có phải là ngoài ý muốn hay không; được coi là hoàn tất khi hành vi include và chẩn đoán mong đợi được bao phủ bởi một bài kiểm thử hồi quy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- C++
- Star
- 2.4k
- Fork
- 270
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 43
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/stdexec
-
inline_scheduler's namespace-scope static_assert fails under nvcc (private nested __sender access) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 65/100
Tất cả issue của NVIDIA/stdexec
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main Đang mởai_reviewed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ydb-platform/ydb#53974 · 3 bình luận ·