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.
std::monostate could be a valid error for taskSection: 33.13.6.5 [task.promise] Status: New Submitter: Dietmar Kühl Opened: 2026-02-21 Last modified: 2026-02-27
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 current specification of the error-variant in 33.13.6.5 [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.
[2026-02-27; Reflector discussion.]
This issue seems to be resolved by 4339(i).
Proposed resolution:
This wording is relative to N5032.
In 33.13.6.5 [task.promise] p2 replace monostate with an implementation-defined, default constructible type:
-2-error-variantis avariant<, with duplicate types removed, wheremonostateempty, remove_cvref_t<E>...>emptyis an implementation-defined, default constructible type andE...are the parameter types of the template arguments of the specialization ofexecution::completion_signaturesdenoted byerror_types.