This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively Ready status.
task::promise_type::return_void/value lack a specificationSection: 33.13.6.5 [task.promise] Status: Tentatively Ready Submitter: Dietmar Kühl Opened: 2025-09-01 Last modified: 2025-10-27
Priority: Not Prioritized
View other active issues in [task.promise].
View all other issues in [task.promise].
View all issues with Tentatively Ready status.
Discussion:
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.
[2025-10-23; Reflector poll.]
Set status to Tentatively Ready after five votes in favour during reflector poll.
Proposed resolution:
Insert the following paragraphs in 33.13.6.5 [task.promise]
after the specification of unhandled_stopped:
coroutine_handle<> unhandled_stopped();-13- Effects: Completes the asynchronous operation associated with
STATE(*this)by invokingset_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
envsuch that queries are forwarded as follows: