This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
task::promise_type::return_value
default template parameterSection: 33.13.6.5 [task.promise] Status: New Submitter: Dietmar Kühl Opened: 2025-09-01 Last modified: 2025-09-01
Priority: Not Prioritized
View other active issues in [task.promise].
View all other issues in [task.promise].
View all issues with New status.
Discussion:
The template parameter V
of
task::promise_type::return_value
doesn't have a default
template argument specified. Specifying a default template argument of T
would enable use of co_return { ... }
which would be
consistent with normal return
statements. This feature
was not discussed in the design paper but based on the LEWG discussion
on 2025-08-26 it is considered to be more a bug fix than a new feature.
Proposed resolution:
Add a default template argument of T
to the template
parameter V
of task::promise_type::return_value
in the synopsis of 33.13.6.5 [task.promise]:
namespace std::execution { template<class T, class Environment> class task<T, Environment>::promise_type { ... template<typename V = T> void return_value(V&& value); ... }; }