Skip to content

[2026-03 LWG Motion 28] P3826R5 Fix Sender Algorithm Customization#8919

Draft
eisenwave wants to merge 1 commit intocplusplus:mainfrom
eisenwave:motions-2026-03-lwg-28
Draft

[2026-03 LWG Motion 28] P3826R5 Fix Sender Algorithm Customization#8919
eisenwave wants to merge 1 commit intocplusplus:mainfrom
eisenwave:motions-2026-03-lwg-28

Conversation

@eisenwave
Copy link
Copy Markdown
Member

Fixes NB US 207-328, US 202-326, FR-031-219, FI-331, and CA-358 (C++26 CD).
@eisenwave eisenwave added this to the post-2026-03 milestone Apr 5, 2026
@eisenwave
Copy link
Copy Markdown
Member Author

As mentioned on the issue, this PR has a merge conflict with #8818. Some heavy massaging may be needed.

Copy link
Copy Markdown
Contributor

@ericniebler ericniebler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know this pr is incomplete. i'll come back and review the rest when its done.

struct @\libglobal{get_forward_progress_guarantee_t}@ { @\unspec@ };
template<class CPO>
struct @\libglobal{get_completion_scheduler_t}@ { @\unspec@ };
template<class CPO>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
template<class CPO>
template<class CPO = void>

For subexpressions \tcode{q} and \tcode{tag} and pack \tcode{args},
let \tcode{\exposid{HIDE-SCHED}(q)} be an object \tcode{o} such that
\tcode{o.query(\brk{}tag, args...)} is ill-formed when the decayed type of \tcode{tag} is
\tcode{get_scheduler_t} or \tcode{get_domain_t}, and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a conflict here with #8925. get_scheduler_t should be get_start_scheduler_t. that could be done as part of #8925 if this pr is merged first.

of the following expressions that is well-formed:
\begin{itemize}
\item \tcode{auto(\exposid{AS-CONST}(env).query(get_domain))}.
\item \tcode{get_completion_domain<set_value_t>(get_scheduler(env), \exposid{HIDE-SCHED}(env))}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: another merge conflict with #8925. s/get_scheduler/get_start_scheduler/

but if \tcode{fn}'s evaluation is potentially throwing,
\tcode{sndr}'s \tcode{set_error} completion domain tag would be
the \exposid{COMMON-DOMAIN} of \tcode{sndr}'s value and error completion domain tags,
in accordance with the semantics of the then algorithm\iref{exec.then}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in accordance with the semantics of the then algorithm\iref{exec.then}.
in accordance with the semantics of the \tcode{then} algorithm\iref{exec.then}.

\tcode{\exposid{SCHED-ENV}(sch)} is an expression \tcode{o}
whose type satisfies \exposconcept{queryable}
such that \tcode{o2.query(get_scheduler)} is a prvalue
such that \tcode{o.query(\brk{}get_scheduler)} is a prvalue
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another conflict with #8925 here: get_scheduler should be get_start_scheduler.

\pnum
For a subexpression \tcode{env},
\tcode{\exposid{inline-attrs}<Tag>{}.query(get_completion_scheduler<Tag>, env)}
is expres\-sion-equivalent to \tcode{get_scheduler(env)}.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another s/get_scheduler/get_start_scheduler/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2026-03 LWG Motion 28] P3826R5 Fix Sender Algorithm Customization P3826 R3 Fix Sender Algorithm Customization

2 participants