This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.
Section: 33.9.12.12 [exec.when.all] Status: WP Submitter: Eric Niebler Opened: 2025-10-30 Last modified: 2025-11-11
Priority: Not Prioritized
View all other issues in [exec.when.all].
View all issues with WP status.
Discussion:
Addresses US 220-344 and US 224-34233.9.12.12 [exec.when.all] p5 reads as follows:
-5- Let
make-when-all-envbe the following exposition-only function template:template<class Env> constexpr auto make-when-all-env(inplace_stop_source& stop_src, // exposition only Env&& env) noexcept { return see below; }Returns an object
esuch that
- (5.1) —
decltype(e)modelsqueryable, and- (5.2) —
e.query(get_stop_token)is expression-equivalent tostate.stop-src.get_token(), and- (5.3) — given a query object
qwith type other than cvstop_token_tand whose type satisfiesforwarding-query,e.query(q)is expression-equivalent toget_env(rcvr).query(q).
The problem is with "state.stop-src.get_token()" in bullet (5.2). There is no state
object here. This expression should be stop_src.get_token().
[Kona 2025-11-04; add edits to address NB comments.]
[Kona 2025-11-06; approved by LWG. Status changed: New → Immediate.]
[Kona 2025-11-08; Status changed: Immediate → WP.]
Proposed resolution:
This wording is relative to N5014.
Modify 33.9.12.12 [exec.when.all] as indicated:
-5- Let
make-when-all-envbe the following exposition-only function template:template<class Env> constexpr auto make-when-all-env(inplace_stop_source& stop_src, // exposition only Env&& env) noexcept;{ return see below; }-?- Returns: An
Returns andobjectesuch that
- (5.1) —
decltype(e)modelsqueryable, and- (5.2) —
e.query(get_stop_token)is expression-equivalent to, andstate.stop-srcstop_src.get_token()- (5.3) — given a query object
qwith type other than cvget_stop_token_tand whose type satisfies,forwarding-querye.query(q)is expression-equivalent toget_env(rcvr)env.query(q)if the type ofqsatisfiesforwarding-query, and ill-formed otherwise.