Skip to content

let_[*].transform_env is specified in terms of the let_* sender itself instead of its child #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ericniebler opened this issue Feb 2, 2025 · 1 comment
Labels
bug Something isn't working P1 pending-wg21 A paper or an LWG issue exits

Comments

@ericniebler
Copy link
Collaborator

[exec.let] para 13 reads:

  1. Let sndr and env be subexpressions, and let Sndr be decltype((sndr)). If sender-for<Sndr, decayed-typeof<let-cpo>> is false, then the expression let-cpo.transform_env(sndr, env) is ill-formed. Otherwise, it is equal to JOIN-ENV(let-env(sndr), FWD-ENV(env)).

the sender passed to let-env here should be the child of sndr.

Proposed resolution

Change [exec.let] para 13 as follows:

 13. Let sndr and env be subexpressions, and let Sndr be decltype((sndr)). If
     sender-for<Sndr, decayed-typeof<let-cpo>> is false, then the expression
     let-cpo.transform_env(sndr, env) is ill-formed. Otherwise, it is equal to
-    JOIN-ENV(let-env(sndr), FWD-ENV(env)).
+
+       auto& [_, _, child] = sndr;
+       return JOIN-ENV(let-env(child), FWD-ENV(env));
@ericniebler ericniebler added bug Something isn't working P1 labels Feb 2, 2025
@jwakely
Copy link
Member

jwakely commented Feb 5, 2025

@ericniebler ericniebler added the pending-wg21 A paper or an LWG issue exits label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 pending-wg21 A paper or an LWG issue exits
Projects
None yet
Development

No branches or pull requests

2 participants