Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify in vector::pop_back if _CONTAINER_DEBUG_LEVEL > 0 #4849

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

vasama
Copy link
Contributor

@vasama vasama commented Jul 20, 2024

Use _CONTAINER_DEBUG_LEVEL > 0 instead of _ITERATOR_DEBUG_LEVEL == 2 in vector::pop_back. The former seems to be the better choice considering that there are no iterators involved here.

@vasama vasama requested a review from a team as a code owner July 20, 2024 19:18
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Jul 21, 2024
@StephanTLavavej StephanTLavavej self-assigned this Jul 21, 2024
@StephanTLavavej
Copy link
Member

Related to #586.

@StephanTLavavej StephanTLavavej removed their assignment Aug 2, 2024
@StephanTLavavej
Copy link
Member

Thanks, this makes vector<T> consistent with list<T>. 😸 I have ideas for followups but this change is a strict improvement.

We merge PRs simultaneously to our GitHub and MSVC-internal repos in a semi-manual process, batched up to save time. Your PR will be part of the next batch, likely next week depending on how busy I am. I'll post comments here as I prepare to merge your PR!

@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 877717a into microsoft:main Aug 8, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks for this enhancement and congratulations on your first microsoft/STL commit! 🥇 😻 🎉

This is expected to ship in VS 2022 17.12 Preview 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants