Skip to content

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

Open
@ericniebler

Description

@ericniebler

[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));

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1bugSomething isn't workingpending-wg21A paper or an LWG issue exits

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions