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.
stop-when needs to evaluate unstoppable tokensSection: 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.
Modify 33.9.12.17 [exec.stop.when], as indicated:
-2- The name
stop-whendenotes an exposition-only sender adaptor. For subexpressionssndrandtoken:
- (2.1) — If
decltype((sndr))does not satisfysender, orremove_cvref_t<decltype((token))>does not satisfystoppable_token, thenstop-when(sndr, token)is ill-formed.- (2.2) — Otherwise, if
remove_cvref_t<decltype((token))>modelsunstoppable_tokenthenstop-when(sndr, token)is expression-equivalent to(void)token, sndr, except thattokenandsndrare indeterminately sequenced.