AntoinePrv commented on code in PR #47896:
URL: https://github.com/apache/arrow/pull/47896#discussion_r2454206248


##########
cpp/src/arrow/util/bit_util.h:
##########
@@ -118,6 +118,16 @@ constexpr uint64_t LeastSignificantBitMask(int64_t 
bit_index) {
   return (static_cast<uint64_t>(1) << bit_index) - 1;
 }
 
+// Returns a mask for the bit_index lower order bits.
+// Only valid for bit_index in the range [0, sizeof(Uint)].
+template <typename Uint>
+constexpr auto LeastSignificantBitMaskInc(Uint bit_index) {

Review Comment:
   `Inc` was for inclusive but your solution is good too!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to