Title
`stop-when` needs to evaluate unstoppable tokens
Status
wp
Section
[exec.stop.when]
Submitter
Jonathan Wakely

Created on 2025-11-06.00:00:00 last changed 1 month ago

Messages

Date: 2025-11-11.10:48:55

Proposed resolution:

This wording is relative to N5014.

  1. Modify [exec.stop.when], as indicated:

    -2- The name `stop-when` denotes an exposition-only sender adaptor. For subexpressions `sndr` and `token`:

    1. (2.1) — If `decltype((sndr))` does not satisfy `sender`, or remove_cvref_t<decltype((token))> does not satisfy `stoppable_token`, then stop-when(sndr, token) is ill-formed.
    2. (2.2) — Otherwise, if remove_cvref_t<decltype((token))> models `unstoppable_token` then stop-when(sndr, token) is expression-equivalent to (void)token, sndr, except that `token` and `sndr` are indeterminately sequenced.

Date: 2025-11-11.10:48:55

[ Kona 2025-11-08; Status changed: Immediate → WP. ]

Date: 2025-11-07.19:18:11

[ Kona 2025-11-07; approved by LWG. Status changed: New → Immediate. ]

Date: 2025-11-06.00:00:00
Addresses US 226-345

For the case where `token` models `unstoppable_token` the expression that `stop-when` is expression-equivalent to needs to include the fact that `token` is evaluated (even if not used).

History
Date User Action Args
2025-11-11 10:48:55adminsetmessages: + msg15709
2025-11-11 10:48:55adminsetstatus: immediate -> wp
2025-11-07 19:18:11adminsetmessages: + msg15593
2025-11-07 19:18:11adminsetstatus: new -> immediate
2025-11-07 06:29:20adminsetmessages: + msg15581
2025-11-06 00:00:00admincreate