Workaround for MSVC's `constexpr` array allocation bug for `vector` by frederick-vs-ja · Pull Request #6177 · microsoft/STL · GitHub
Skip to content

Workaround for MSVC's constexpr array allocation bug for vector#6177

Merged
StephanTLavavej merged 2 commits into
microsoft:mainfrom
frederick-vs-ja:workaround-dev-11060638
Mar 27, 2026
Merged

Workaround for MSVC's constexpr array allocation bug for vector#6177
StephanTLavavej merged 2 commits into
microsoft:mainfrom
frederick-vs-ja:workaround-dev-11060638

Conversation

@frederick-vs-ja

Copy link
Copy Markdown
Contributor

This PR adds workaround for DevCom-11060638 needed for vector. Closes #6155.

Due the implementation strategy of MSVC, if a user directly uses allocator<T[N]>::allocate, the behavior in constant evaluation is still broken. There doesn't seem any possible workaround in the library implementation for this.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner March 23, 2026 01:51
@github-project-automation github-project-automation Bot moved this to Initial Review in STL Code Reviews Mar 23, 2026
@StephanTLavavej StephanTLavavej added the test Related to test code label Mar 23, 2026
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Mar 25, 2026
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Mar 25, 2026
@StephanTLavavej

Copy link
Copy Markdown
Member

@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Mar 26, 2026
@StephanTLavavej StephanTLavavej merged commit 05b4b08 into microsoft:main Mar 27, 2026
49 checks passed
@github-project-automation github-project-automation Bot moved this from Merging to Done in STL Code Reviews Mar 27, 2026
@StephanTLavavej

Copy link
Copy Markdown
Member

@frederick-vs-ja frederick-vs-ja deleted the workaround-dev-11060638 branch March 27, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved test Related to test code

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

P1004R2_constexpr_vector: Report MSVC constexpr error affecting std::construct_at array support

2 participants