Helper __awaitable concept doesn't correctly handle await_transform
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
Bắt đầu trong include/coroutine.hpp, tại phần xung quanh concept __awaitable ở dòng được liên kết, sau đó so sánh các kiểm tra của concept này với ngữ nghĩa coroutine đã nêu và ví dụ std::generator promise_type. Xác định concept nên tính đến một member await_transform được khai báo như thế nào và liệu compiler intrinsic bắt buộc có khả dụng hay không; hoàn thành khi concept không còn báo cáo các biểu thức co_await không hợp lệ là awaitable.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- 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 70/100
google/libultrahdr#485 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
godotengine/godot#123776 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 60/100
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ros2/common_interfaces#344 ·