cplusplus / sender-receiver

Issues list for P2300
Apache License 2.0
20 stars 3 forks source link

The `ensure_started` specification is inconsistent about whether it returns a single-shot sender or not #83

Closed ericniebler closed 3 months ago

ericniebler commented 10 months ago

Issue by ericniebler Saturday Sep 10, 2022 at 15:09 GMT Originally opened as https://github.com/NVIDIA/stdexec/issues/605


Several things in the spec indicate that the intention is single-shot; e.g.,

Calls Signal(out_r', args2...), where args2... is a pack of xvalues referencing the subobjects of sh_state that have been saved by the original call to Signal(r, args...)

and

s2 transfers its ownership of sh_state to op_state.

and

where set-value-signature is the alias template:

template <class... Ts>
  using set-value-signature =
    completion_signatures<set_value_t(decay_t<Ts>&&...)>;

and error-types is the alias template:

template <class E>
  using error-types =
    completion_signatures<set_error_t(decay_t<E>&&)>;

But nowhere do we say that connect on an lvalue ensure_started sender is ill-formed, and in the specification of its get_completion_signatures customization, we carefully use copy_cvref_t to copy the cv- and reference-qualification from the ensure_stated sender to the wrapped sender. Why?

ericniebler commented 3 months ago

ensure_started was removed (see P3187R1).