Created on 2025-02-03.00:00:00 last changed 2 months ago
Proposed resolution:
This wording is relative to N5001.
template<class Sndr> concept is-sender = // exposition only derived_from<typename Sndr::sender_concept, sender_t>; template<class Sndr> concept enable-sender = // exposition only is-sender<Sndr> || is-awaitable<Sndr, env-promise<empty_env>>; // [exec.awaitable] template<class Sndr> inline constexpr bool enable_sender = enable-sender<Sndr>; template<class Sndr> concept sender =
bool(enable-senderenable_sender<remove_cvref_t<Sndr>>)&& requires (const remove_cvref_t<Sndr>& sndr) { { get_env(sndr) } -> queryable; } && move_constructible<remove_cvref_t<Sndr>> && constructible_from<remove_cvref_t<Sndr>, Sndr>;…
-2- Given a subexpression `sndr`, […]
-?- Remarks: Pursuant to [namespace.std], users may specialize `enable_sender` to `true` for cv-unqualified program-defined types that model `sender`, and `false` for types that do not. Such specializations shall be usable in constant expressions ([expr.const]) and have type `const bool`.
[ Hagenberg 2025-02-11; move to Ready ]
[ 2025-02-07; Reflector poll ]
Set priority to 1 after reflector poll.
Imported from cplusplus/sender-receiver #305 and cplusplus/sender-receiver #306.
We require an opt-in to satisfy the `sender` concept. Making your type awaitable with an empty environment is one way to opt in. If your awaitable requires an environment, you have two options:
enable-sender
concept.
We should roll back that change.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-02-11 17:35:18 | admin | set | messages: + msg14632 |
2025-02-11 17:35:18 | admin | set | status: new -> ready |
2025-02-07 20:50:56 | admin | set | messages: + msg14595 |
2025-02-03 18:49:08 | admin | set | messages: + msg14567 |
2025-02-03 00:00:00 | admin | create |