Created on 2024-08-20.00:00:00 last changed 2 months ago
Proposed resolution:
This wording is relative to N4988.
Modify [exec.set.value] as indicated:
-1- set_value is a value completion function ([exec.async.ops]). Its associated completion tag is set_value_t. The expression set_value(rcvr, vs...) for a subexpression rcvr and pack of subexpressions vs is ill-formed if rcvr is an lvalue or an rvalue of const type. Otherwise, it is expression-equivalent to MANDATE-NOTHROW(void(rcvr.set_value(vs...))).
Modify [exec.set.error] as indicated:
-1- set_error is an error completion function ([exec.async.ops]). Its associated completion tag is set_error_t. The expression set_error(rcvr, err) for some subexpressions rcvr and err is ill-formed if rcvr is an lvalue or an rvalue of const type. Otherwise, it is expression-equivalent to MANDATE-NOTHROW(void(rcvr.set_error(err))).
Modify [exec.set.stopped] as indicated:
-1- set_stopped is a stopped completion function ([exec.async.ops]). Its associated completion tag is set_stopped_t. The expression set_stopped(rcvr) for a subexpression rcvr is ill-formed if rcvr is an lvalue or an rvalue of const type. Otherwise, it is expression-equivalent to MANDATE-NOTHROW(void(rcvr.set_stopped())).
Modify [exec.opstate.start] as indicated:
-1- The name start denotes a customization point object that starts ([exec.async.ops]) the asynchronous operation associated with the operation state object. For a subexpression op, the expression start(op) is ill-formed if op is an rvalue. Otherwise, it is expression-equivalent to MANDATE-NOTHROW(void(op.start())).
[ 2024-09-18; Reflector poll ]
Set priority to 2 after reflector poll. Should require the expressions to have type `void`, rather than just discarding anything that is returned.
In editorial issue #7222, it was observed that currently execution::start may have a non-void return value, which possibly interacts with overloaded operator,. But the return value of execution::start doesn't seem used anywhere.
In addition to execution::start, the return values of execution::set_value, execution::set_error, and execution::set_stopped also seem never used, and the return type of these CPOs are always void in stdexec. Perhaps it would be better to specified in the standard that these CPOs always return void.History | |||
---|---|---|---|
Date | User | Action | Args |
2024-09-18 22:37:26 | admin | set | messages: + msg14385 |
2024-08-31 13:32:11 | admin | set | messages: + msg14346 |
2024-08-20 00:00:00 | admin | create |