KEMBAR78
`vector_algorithms.cpp`: avoid cast to integral in `__std_bitset_from_string_N` by AlexGuteniev · Pull Request #5759 · microsoft/STL · GitHub
Skip to content

Conversation

AlexGuteniev
Copy link
Contributor

This avoids potential misaligned access, which can only happen if the user has managed to misalign the bitset itself...

Meh, but it is still cleaner and consistent with using memcpy elsewhere.

The benchmark results are the same.

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner October 4, 2025 07:20
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Oct 4, 2025
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Oct 4, 2025
@StephanTLavavej StephanTLavavej self-assigned this Oct 4, 2025
@StephanTLavavej StephanTLavavej added enhancement Something can be improved and removed bug Something isn't working labels Oct 4, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Oct 8, 2025
@StephanTLavavej StephanTLavavej removed their assignment Oct 8, 2025
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Oct 9, 2025
@StephanTLavavej StephanTLavavej merged commit 9ba4a22 into microsoft:main Oct 10, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Oct 10, 2025
@StephanTLavavej
Copy link
Member

Thanks for cleaning up this unnecessarily scary cast! 👻 🎃 🧛

@AlexGuteniev AlexGuteniev deleted the word-is-a-bird branch October 10, 2025 09:13
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