microsoft / microsoft/STL

`<experimental/generator>` should be deprecated, then removed

Open
#5,000 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

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:

https://github.com/microsoft/STL/blob/faccf0084ed9b8b58df103358174537233b178c7/stl/inc/generator#L480

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the experimental and C++23 generator headers, then investigate whether Windows kernel mode depends on <experimental/generator>. Review the precondition handling at stl/inc/generator around line 480 and determine the deprecation and removal steps, including whether kernel-mode support requires making the header core. Done means the dependency question and migration plan are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.