File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,14 +235,12 @@ namespace {
235235 }
236236
237237 struct int_err_transform {
238- using my_res_t = decltype (fallible_just{0 });
239-
240- auto operator ()(std::exception_ptr ep) const -> my_res_t {
238+ auto operator ()(std::exception_ptr ep) const -> fallible_just<int> {
241239 std::rethrow_exception (ep);
242- return { };
240+ return fallible_just{ 0 };
243241 }
244242
245- auto operator ()(int x) const -> my_res_t {
243+ auto operator ()(int x) const -> fallible_just<int> {
246244 return fallible_just{x * 2 - 1 };
247245 }
248246 };
Original file line number Diff line number Diff line change @@ -42,11 +42,14 @@ namespace {
4242
4343 template <class ... Values>
4444 struct fallible_just {
45- std::tuple<Values...> values_;
4645 using sender_concept = stdexec::sender_t ;
4746 using completion_signatures =
4847 ex::completion_signatures<ex::set_value_t (Values...), ex::set_error_t (std::exception_ptr)>;
4948
49+ explicit fallible_just (Values... values)
50+ : values_(std::move(values)...) {
51+ }
52+
5053 template <class Receiver >
5154 struct operation : immovable {
5255 std::tuple<Values...> values_;
@@ -68,6 +71,8 @@ namespace {
6871 -> operation<std::decay_t<Receiver>> {
6972 return {{}, std::move (self.values_ ), std::forward<Receiver>(rcvr)};
7073 }
74+
75+ std::tuple<Values...> values_;
7176 };
7277
7378 template <class ... Values>
You can’t perform that action at this time.
0 commit comments