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

Created on 2025-08-27.00:00:00 last changed 3 days ago

Messages

Date: 2025-09-14.13:08:46

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-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-09-14 13:08:46adminsetmessages: + msg15036
2025-08-27 00:00:00admincreate