Title
specification of as-sndr2(Sig) in [exec.let] is incomplete
Status
ready
Section
[exec.let]
Submitter
Eric Niebler

Created on 2025-02-03.00:00:00 last changed 3 months ago

Messages

Date: 2025-02-11.17:35:18

Proposed resolution:

This wording is relative to N5001.

  1. Change [exec.let] as indicated:

    -7- impls-for<decayed-typeof<let-cpo>>::get-state is initialized with a callable object equivalent to the following:

    
      []<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) requires see below {
        auto& [_, fn, child] = sndr;
        using fn_t = decay_t<decltype(fn)>;
        using env_t = decltype(let-env(child));
        using args_variant_t = see below;
        using ops2_variant_t = see below;
    
        struct state-type {
          fn_t fn;                    // exposition only
          env_t env;                  // exposition only
          args_variant_t args;        // exposition only
          ops2_variant_t ops2;        // exposition only
        };
        return state-type{std::forward_like<Sndr>(fn), let-env(child), {}, {}};
      }
    

    -8- Let `Sigs` be a pack of the arguments to the `completion_signatures` specialization named by completion_signatures_of_t<child-type<Sndr>, 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.

    -9- Given a type `Tag` and a pack `Args`, let as-sndr2 be an alias template such that as-sndr2<Tag(Args...)> denotes the type call-result-t<Fn, decay_t<Args>&...>. Then `ops2_variant_t` denotes the type

     variant<monostate, connect_result_t<as-sndr2<LetSigs>, receiver2<Rcvr, Envenv_t>>...>
    
    except with duplicate types removed.

    -10- The requires-clause constraining the above lambda is satisfied if and only if the types `args_variant_t` and `ops2_variant_t` are well-formed.

Date: 2025-02-11.17:35:18

[ Hagenberg 2025-02-11; move to Ready ]

Dropped the suggestion to nest p8-10 under p7.

Date: 2025-02-15.00:00:00

[ 2025-02-07; Reflector poll ]

Set priority to 1 after reflector poll.

Date: 2025-02-03.00:00:00

[exec.let]/p9 reads:

Given a type `Tag` and a pack `Args`, let as-sndr2 be an alias template such that as-sndr2<Tag(Args...)> denotes the type call-result-t<Fn, decay_t<Args>&...>. Then `ops2_variant_t` denotes the type
 variant<monostate, connect_result_t<as-sndr2<LetSigs>, receiver2<Rcvr, Env>>...>
except with duplicate types removed.
The type `Env` is not specified. It should be `env_t` from paragraph 7.

Paragraphs 8, 9, and 10 only make sense in relation to the lambda in paragraph 7, but that is not at all clear from the current wording. I suggest making paragraphs 8, 9, and 10 sub-bullets of paragraph 7.

History
Date User Action Args
2025-02-11 17:35:18adminsetmessages: + msg14634
2025-02-11 17:35:18adminsetstatus: new -> ready
2025-02-07 22:00:14adminsetmessages: + msg14605
2025-02-03 20:42:02adminsetmessages: + msg14569
2025-02-03 00:00:00admincreate