Skip to content

Commit f350cb9

Browse files
committed
fix the lowering of the on(sndr, sch, closure) lowering
1 parent 64524f0 commit f350cb9

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

include/stdexec/__detail/__continues_on.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace stdexec {
5656
}
5757

5858
static auto __transform_sender_fn() {
59-
return [&]<class _Data, class _Child>(__ignore, _Data&& __data, _Child&& __child) {
59+
return []<class _Data, class _Child>(__ignore, _Data&& __data, _Child&& __child) {
6060
return schedule_from(static_cast<_Data&&>(__data), static_cast<_Child&&>(__child));
6161
};
6262
}

include/stdexec/__detail/__on.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,14 @@ namespace stdexec {
172172
} else {
173173
// This branch handles the case where `on` was called like `sndr | on(sch, clsur)`
174174
auto&& [__sched, __clsur] = static_cast<_Data&&>(__data);
175-
return write_env(
176-
continues_on(
177-
__forward_like<_Data>(__clsur)(continues_on(
178-
write_env(static_cast<_Child&&>(__child), __with_sched{__old}), __sched)),
179-
__old),
180-
__with_sched{__sched});
175+
return continues_on(
176+
write_env(
177+
__forward_like<_Data>(__clsur)( //
178+
continues_on(
179+
write_env(static_cast<_Child&&>(__child), __with_sched{__old}), //
180+
__sched)),
181+
__with_sched{__sched}),
182+
__old);
181183
}
182184
};
183185
}

0 commit comments

Comments
 (0)