Title
std::monostate could be a valid error for task
Status
new
Section
[task.promise]
Submitter
Dietmar Kühl

Created on 2026-02-21.00:00:00 last changed 1 week ago

Messages

Date: 2026-02-27.16:05:19

Proposed resolution:

This wording is relative to N5032.

  1. In [task.promise] p2 replace monostate with an implementation-defined, default constructible type:

    -2- error-variant is a variant<monostateempty, remove_cvref_t<E>...>, with duplicate types removed, where empty is an implementation-defined, default constructible type and E... are the parameter types of the template arguments of the specialization of execution::completion_signatures denoted by error_types.
Date: 2026-02-15.00:00:00

[ 2026-02-27; Reflector discussion. ]

This issue seems to be resolved by 4339.

Date: 2026-02-21.00:00:00

The current specification of the error-variant in [task.promise] p2 uses std::monostate as a placeholder for the absence of an error: variant<monostate, remove_cvref_t<E>...>. However, std::monostate can be an actual error type. It should be replaced by an implementation-defined, default constructible type.

History
Date User Action Args
2026-02-27 16:05:19adminsetmessages: + msg15986
2026-02-22 08:33:43adminsetmessages: + msg15969
2026-02-21 00:00:00admincreate