microsoft / microsoft/STL

`<tuple>`: Can we eliminate `_Tuple_val`?

Open
#191 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

_Tuple_val deals with uses-allocator construction:

https://github.com/microsoft/STL/blob/957fe99f41748b80c3108447e5dd5ce2be962f4e/stl/inc/tuple#L158-L182

However, I believe that it would be possible to fuse this behavior into tuple itself, avoiding this extra object. That could improve throughput, and generally simplify tuple's representation (at the cost of more tuple constructor complexity, but that battle has been thoroughly lost).

In theory, I believe we could do this without breaking bincompat, but this would be a fairly significant change, so it's probably vNext.

vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.

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 with stl/inc/tuple around lines 158-182 and inspect how _Tuple_val handles uses-allocator construction. Compare that behavior with tuple's constructors and representation, keeping the vNext binary-compatibility requirement in mind. Done means the extra object is eliminated without losing the required construction behavior; work must wait for the vNext branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.