You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH-48591: [C++] Remove some bit utils from bit_utils.h and replace them with C++ 20 built in functions (#49298)
### Rationale for this change
Before C++ 20 there was no built in implementation for many common bit operations utilities included in the stdlib so they were implemented in bit_utils.h. Now that they are included in the stdlib they should be removed from bit_utils to decrease the amount of code that needs to be maintained as described in #48591
### What changes are included in this PR?
IsPowerOf2, PopCount, CountLeadingZeros, CountTrailingZeros, NumRequiredBits are removed from bit_utils and replaced with their equivalents from bit.h i.e. has_single_bit, popcount, countl_zero, countr_zero and bit_width.
### Are these changes tested?
No new code is introduced and the stdlib implementation maintains parity with the replaced functions so no new unit tests are necessary.
### Are there any user-facing changes?
No
* GitHub Issue: #48591
Lead-authored-by: Paweł Biegun <biegunpawel900@gmail.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
0 commit comments