`exec::finally()` shouldn't include `std::exception_ptr` in the error types if neither the source or final senders include that error type
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với reproducer được liên kết trong issue và kiểm tra exec/finally.hpp cùng với cách xử lý sender và kiểu lỗi trong stdexec/execution.hpp. Truy vết lý do let_error được khởi tạo với std::exception_ptr khi không có sender nào khai báo kiểu này. Hoàn thành khi ví dụ biên dịch được mà không có kiểu lỗi bổ sung đó và vẫn giữ nguyên hành vi của finally.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I would have expected the following code to compile, but it fails because let_error tries to instantiate a call to the lambda with an argument of type std::exception_ptr.
https://godbolt.org/z/PK8YjohW8
#include <stdexec/execution.hpp>
#include <exec/finally.hpp>
#include <cstdio>
struct X {
X() : value(0) { std::puts("X::X()"); }
X(X&& o) noexcept : value(o.value) { std::puts("X::X(X&&)"); }
X(const X& o) noexcept : value(o.value) { std::puts("X::X(const X&)"); }
~X() { std::puts("X::~X()"); value = -1; }
int value;
};
int main() {
auto result = stdexec::sync_wait(
stdexec::let_error(
exec::finally(
stdexec::just_error(X{}),
stdexec::just()),
[](const X& x) noexcept {
std::printf("caught X(value=%i)\n", x.value);
return stdexec::just();
}));
}
I suspect that this is because we don't know ahead of time whether connect() is potentially throwing.
We could potentially work around this by instead connecting the final-sender at connect-time of the finally sender. This way, we know that we will be able start the final-operation when the input operation completes regardless of whether the connect() method is throwing or not.
- 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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
duckdb/duckdb-wasm#2258 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Đang mởcoarray
Độ 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 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·