]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
include/intarith: rewrite cbits() in C++20
authorKefu Chai <tchaikov@gmail.com>
Sun, 21 Aug 2022 16:59:01 +0000 (00:59 +0800)
committerKefu Chai <tchaikov@gmail.com>
Mon, 22 Aug 2022 10:03:59 +0000 (18:03 +0800)
commitdc92dfc9c38ffbbbcee5b9f9705c23c5d4927569
tree19e8584ec80add800901fe6c87cb246082d3e29e
parent275ec55c952c257945e61c981ce150e2b85d5e4f
include/intarith: rewrite cbits() in C++20

rewrite cbits() using concept and std::countl_zero(), for better
readability and maintanability.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/include/intarith.h