Created on 2025-11-05.00:00:00 last changed 7 days ago
Proposed resolution:
This wording is relative to N5014.
Modify [task.promise], as indicated:
auto final_suspend() noexcept;-7- Returns: An awaitable object of unspecified type ([expr.await]) whose member functions arrange for the completion of the asynchronous operation associated with STATE(*this) by invoking:
- (7.1) — set_error(std::move(RCVR(*this)), std::move(e)) if errors.index() is greater than zero and `e` is the value held by errors, otherwise
- (7.2) — set_value(std::move(RCVR(*this))) if is_void<T> is `true`, and otherwise
- (7.3) — set_value(std::move(RCVR(*this)), *std::move(result)).
[ 2025-12-04; Reflector poll. ]
Set priority to 2 after reflector poll.
[ 2025-11-07; This would be resolved by LWG 4339. ]
In [task.promise] there's the following bullet (7.3):
set_value(std::move(RCVR(*this)), *result).
This has the effect of sending the result as an lvalue whereas an rvalue is almost certainly what's intended, see the bullet (7.1) above:
set_error(std::move(RCVR(*this)), std::move(e)) […]
Resolution would be to change the bullet (7.3) to:
set_value(std::move(RCVR(*this)), *std::move(result)).
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-12-05 16:52:33 | admin | set | messages: + msg15782 |
| 2025-11-08 02:29:11 | admin | set | messages: + msg15606 |
| 2025-11-07 18:30:15 | admin | set | messages: + msg15591 |
| 2025-11-05 00:00:00 | admin | create | |