microsoft / microsoft/STL

`<vector>`: Add `_CONSTEXPR26` to `_Vaporization_guard`'s destructor once P3068R6 gets implemented

Open
#5,108 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

#4977 added several scope guard types to our implementation of vector, while one of them doesn't have constexpr destructor yet.

https://github.com/microsoft/STL/blob/5e0ddadefd38b9ab50f2b8772ad4cb001133fd9d/stl/inc/vector#L637-L645

Lack of constexpr was deliberate - since _Vaporization_guard objects are only created and destroyed during exception handling, which can't happen during exception at this moment.

However, WG21-P3068R6 (tracked by #5136) makes exception handling compatible with constant evaluation, and the paper is recently adopted for C++26. So we need to add _CONSTEXPR26 once P3068 gets implemented (which means that this issue is blocked until that moment).

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

First check #5136 and the P3068R6 implementation status, since this issue is explicitly blocked by constant-evaluation support for exception handling. Then inspect stl/inc/vector around lines 637-645; once the prerequisite is available, add _CONSTEXPR26 to _Vaporization_guard's destructor and verify the vector implementation builds and supports the intended constant-evaluation case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.