Skip to content

Conversation

@AlexGuteniev
Copy link
Contributor

@AlexGuteniev AlexGuteniev commented Aug 26, 2025

Some changes to improve consistency:

  • Rename _Countl_zero_internal to just _Countl_zero, consistently with _Countr_zero and _Popcount.
  • Promote it from __msvc_int128.hpp to __msvc_bit_utils.hpp, where _Countr_zero and _Popcount already are
  • This allows some code de-duplication, and dropping _STD in countl_one, whuch also increases consistency.

@AlexGuteniev AlexGuteniev requested a review from a team as a code owner August 26, 2025 09:58
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Aug 26, 2025
@AlexGuteniev AlexGuteniev changed the title Promote internal _Countl_zero to __msvc_bit_utils.hpp Promote internal _Countl_zero to __msvc_bit_utils.hpp to reduce code duplication and improve consistency Aug 26, 2025
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Aug 28, 2025
@StephanTLavavej
Copy link
Member

Thanks, this is great! I love the reduction of code duplication. 😻 😻

@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Aug 28, 2025
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Sep 10, 2025
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej
Copy link
Member

I've fixed a stealth merge conflict with #5637.

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

@AlexGuteniev, he's my hero, gonna take code duplication down to zero! 🦸‍♂️ 🌍 😹

@AlexGuteniev AlexGuteniev deleted the contr_zero_consistency branch September 10, 2025 16:43
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