Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how/whether we should use P2830 "Standardized Constexpr Type Ordering" in sender/receiver #330

Open
lewissbaker opened this issue Feb 15, 2025 · 3 comments
Labels
design discussion We need to talk about this; there's nothing actionable here yet needs-paper Needs a paper to be written P0

Comments

@lewissbaker
Copy link
Collaborator

The paper P2830 states that one of the motivations for adding type-ordering was to help libraries like sender/receiver proposed in P2300.

It looks like this facility is on track to make it in to C++26, so we should figure out exactly where we want to apply this facility in the specification of sender/receiver and write a paper to do so before we ship sender/receiver in a published standard.

e.g. maybe we require that completion_signatures is instantiated with types listed in ascending order as given by std::type_order_v.

Are there any other places we can/want to make use of this facility?
CC: @ericniebler @atomgalaxy

@lewissbaker lewissbaker added design discussion We need to talk about this; there's nothing actionable here yet needs-paper Needs a paper to be written P0 labels Feb 15, 2025
@atomgalaxy
Copy link

Anywhere we erase type signatures too. I use it for any_sender_of to sort the vtable, for instance. Every variant type is normalized too.

@lewissbaker
Copy link
Collaborator Author

I think one of the possible caveats to variant type ordering is that often you want to have the first type be monostate so that the default-constructed variant has an empty value. We could still require that the subsequent types listed are sorted according to std::type_order_v, however.

@atomgalaxy
Copy link

atomgalaxy commented Feb 16, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design discussion We need to talk about this; there's nothing actionable here yet needs-paper Needs a paper to be written P0
Projects
None yet
Development

No branches or pull requests

2 participants