Skip to content

let_value is not applying FWD-ENV as it should #316

@ericniebler

Description

@ericniebler

The child senders should only see the parent's queries if they are forwarding queries.

Proposed resolution

Change [exec.let] para 6 as follows:

  1. Let receiver2 denote the following exposition-only class template:

    namespace std::execution {
      ... as before ...
    }

    Invocation of the function receiver2::get_env returns an object e such that

    1. decltype(e) models queryable and

    2. given a query object q, the expression e.query(q) is expression-equivalent
      to env.query(q) if that expression is valid,; otherwise,
      if the type of q satisfies forwarding-query,
      e.query(q)
      is expression-equivalent to get_env(rcvr).query(q); otherwise, e.query(q)
      is ill-formed
      .

Change para 8 as follows:

  1. Let Sigs be a pack of the arguments to the completion_signatures
    specialization named by completion_signatures_of_t<child-type<Sndr>,
    FWD-ENV-T(env_of_t<Rcvr>)>
    . Let LetSigs be a pack of those types in Sigs with a return
    type of decayed-typeof<set-cpo>. Let as-tuple be an alias template such that
    as-tuple<Tag(Args...)> denotes the type decayed-tuple<Args...>. Then
    args_variant_t denotes the type variant<monostate, as-tuple<LetSigs>...>
    except with duplicate types removed.

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

    Development

    No branches or pull requests

      Participants

      @ericniebler

      Issue actions

        `let_value` is not applying `FWD-ENV` as it should · Issue #316 · cplusplus/sender-receiver