Title
awaitable-sender concept should qualify use of awaitable-receiver type
Status
wp
Section
[exec.as.awaitable]
Submitter
Lewis Baker

Created on 2025-08-27.00:00:00 last changed 1 month ago

Messages

Date: 2025-11-11.10:48:55

Proposed resolution:

This wording is relative to N5014.

  1. Modify [exec.as.awaitable] as indicated:

    -1- `as_awaitable` transforms an object into one that is awaitable within a particular coroutine. Subclause [exec.coro.util] makes use of the following exposition-only entities:

    namespace std::execution {
      template<class Sndr, class Promise>
        concept awaitable-sender =
          single-sender<Sndr, env_of_t<Promise>> &&
          sender_to<Sndr, typename sender-awaitable<Sndr, Promise>::awaitable-receiver> && // see below
          requires (Promise& p) {
            { p.unhandled_stopped() } -> convertible_to<coroutine_handle<>>;
          };
      […]
    }
    
Date: 2025-11-11.10:48:55

[ Kona 2025-11-08; Status changed: Immediate → WP. ]

Date: 2025-11-06.02:57:44

[ Kona 2025-11-06; approved by LWG. Status changed: New → Immediate. ]

Date: 2025-10-15.00:00:00

[ 2025-10-23; Reflector poll. ]

Set priority to 2 after reflector poll.

"We should move the declaration of `sender-awaitable` before the concept."

Date: 2025-08-27.00:00:00

In [exec.as.awaitable] p1 there is an exposition-only helper concept awaitable-sender defined as follows:

namespace std::execution {
  template<class Sndr, class Promise>
    concept awaitable-sender =
      single-sender<Sndr, env_of_t<Promise>> &&
      sender_to<Sndr, awaitable-receiver> && // see below
      requires (Promise& p) {
        { p.unhandled_stopped() } -> convertible_to<coroutine_handle<>>;
      };
}

The mention of the type awaitable-receiver here does not refer to any exposition-only type defined at namespace-scope. It seems to, instead, be referring to the nested member-type sender-awaitable<Sndr, Promise>::awaitable-receiver and so should be qualified as such.

History
Date User Action Args
2025-11-11 10:48:55adminsetmessages: + msg15674
2025-11-11 10:48:55adminsetstatus: immediate -> wp
2025-11-06 02:57:44adminsetmessages: + msg15548
2025-11-06 02:57:44adminsetstatus: new -> immediate
2025-10-23 12:39:14adminsetmessages: + msg15403
2025-09-14 13:08:46adminsetmessages: + msg15036
2025-08-27 00:00:00admincreate