From a31feb0b36e2149d10d48b7ebe7a266600853234 Mon Sep 17 00:00:00 2001 From: Abhinav Agarwal Date: Tue, 16 Jun 2026 20:58:31 -0700 Subject: [PATCH] [exec.let] Fix let-env argument in let-state env_t and constructor In the let-state exposition-only class template, a misplaced closing parenthesis turned get_env(...) into a comma-operator operand instead of the second argument to let-env. As a result env_t collapsed to decltype(get_env(declval())), dropping the inner-sender environment overlay (completion scheduler/domain) carried by let-env, and the constructor's env initializer was inconsistent with that alias. Move the closing parenthesis so get_env(rcvr) is passed as let-env's second argument, matching the two-argument let-env defined earlier in [exec.let] and the env-t used by the check-types constraint. receiver2's get_env already composes env over get_env(rcvr), so storing the raw let-env result is sufficient. --- source/exec.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index 42c1a57a0d..0de5d219b8 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -4252,7 +4252,7 @@ \begin{codeblock} template struct @\exposid{let-state}@ { - using @\exposidnc{env_t}@ = decltype(@\exposidnc{let-env}@(declval()), get_env(declval())); // \expos + using @\exposidnc{env_t}@ = decltype(@\exposidnc{let-env}@(declval(), get_env(declval()))); // \expos Fn @\exposidnc{fn}@; // \expos env_t @\exposidnc{env}@; // \expos ArgsVariant @\exposidnc{args}@; // \expos @@ -4316,7 +4316,7 @@ using @\exposidnc{op_t}@ = connect_result_t; // \expos constexpr @\exposidnc{let-state}@(Sndr&& sndr, Fn fn, Rcvr& rcvr) // \expos - : @\exposid{fn}@(std::move(fn)), @\exposid{env}@(@\exposid{let-env}@(sndr), get_env(rcvr)), + : @\exposid{fn}@(std::move(fn)), @\exposid{env}@(@\exposid{let-env}@(sndr, get_env(rcvr))), @\exposid{ops}@(in_place_type<@\exposid{op_t}@>, std::forward(sndr), @\exposid{receiver}@{*this, rcvr}) {} }; \end{codeblock}