Title
task::promise_type::return_void/value lack a specification
Status
wp
Section
[task.promise]
Submitter
Dietmar Kühl

Created on 2025-09-01.00:00:00 last changed 1 month ago

Messages

Date: 2025-10-27.09:58:11

Proposed resolution:

Insert the following paragraphs in [task.promise] after the specification of unhandled_stopped:

coroutine_handle<> unhandled_stopped();

-13- Effects: Completes the asynchronous operation associated with STATE(*this) by invoking set_stopped(std::move(RCVR(*this))).

-14- Returns: noop_coroutine().

void return_void();

-?- Effects: does nothing.


template<class V>
  void return_value(V&& v);

-?- Effects: Equivalent to result.emplace(std::forward<V>(v)).

unspecified get_env() const noexcept;

-15- Returns: An object env such that queries are forwarded as follows:

Date: 2025-11-11.10:48:16

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

Date: 2025-10-15.00:00:00

[ 2025-10-23; Reflector poll. ]

Set status to Tentatively Ready after five votes in favour during reflector poll.

Date: 2025-10-27.16:17:32
Addresses US 250-389

The synopsis for std::execution::task<T, E>::promise_type declares return_void() or return_value(V&&). However, there is no specification of what these functions actually do. return_void() doesn’t need to do anything at all. return_value(V&& v) needs to store v into the result.

History
Date User Action Args
2025-11-11 10:48:16adminsetstatus: voting -> wp
2025-10-30 17:45:31adminsetstatus: ready -> voting
2025-10-27 09:58:11adminsetmessages: + msg15450
2025-10-23 11:07:53adminsetmessages: + msg15382
2025-10-23 11:07:53adminsetstatus: new -> ready
2025-09-01 20:27:17adminsetmessages: + msg15006
2025-09-01 00:00:00admincreate