This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Immediate status.

4461. stop-when needs to evaluate unstoppable tokens

Section: 33.9.12.17 [exec.stop.when] Status: Immediate Submitter: Jonathan Wakely Opened: 2025-11-06 Last modified: 2025-11-07

Priority: Not Prioritized

View all issues with Immediate status.

Discussion:

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).

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

Proposed resolution:

This wording is relative to N5014.

  1. Modify 33.9.12.17 [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.