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

<experimental/generator> should be deprecated, then removed #5000

Open
StephanTLavavej opened this issue Oct 2, 2024 · 1 comment
Open
Labels
enhancement Something can be improved

Comments

@StephanTLavavej
Copy link
Member

We've merged C++23 <generator> for VS 2022 17.13 Preview 1 (#4953).

It's time to deprecate and then remove <experimental/generator>, since we don't want to encourage users writing non-Standard code when superior replacements are available. (Additionally, early adopters of experimental machinery should know what they're signing up for and can reasonably be expected to be eager upgraders.) This will also avoid bugs in the experimental implementation like #4999.

According to @CaseyCarter, <experimental/generator> generally has very similar behavior to <generator> except in weird corner cases.

For removal, we do need to investigate whether Windows took a dependency on <experimental/generator> in kernel mode, which <generator> does not (yet) attempt to support. If we had to support kernel mode in this one header, it would have to become a core header and we would have to change how we verify preconditions:

_STL_VERIFY(!_Coro.done(), "Can't dereference generator end iterator");

Deprecation in 17.13 and removal in 18.0 sounds like a good plan to us.

@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Oct 2, 2024
@frederick-vs-ja
Copy link
Contributor

<experimental/generator> is not a core header, but it seems that we're just making it usable in kernel mode by skipping somethings. It should be investigated what are necessary for skipping.
It's a bit surprising me that <experimental/generator> includes the whole <memory>...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

No branches or pull requests

2 participants