<tuple>: Consider non-recursive assignment/swap/comparison
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
Our recursive-inheritance tuple implementation has a _This_type typedef and _Get_rest() member function:
https://github.com/microsoft/STL/blob/6b0238d7035236af0f81917262691db701e70fe3/stl/inc/tuple#L229
They're used to implement assignment, swap, and comparison recursively:
It could be simpler (and better for throughput) to implement this non-recursively with pack expansions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in stl/inc/tuple at the referenced _This_type, _Get_rest(), and assignment, swap, and comparison implementations. Review how the recursive operations are structured, then assess a pack-expansion-based replacement while preserving the existing tuple behavior and standard-library requirements. The issue is complete when these operations no longer depend on recursive implementation and their behavior remains correct.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100