3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-07 22:04:53 +00:00
This commit is contained in:
Nuno Lopes 2026-02-15 17:11:17 +00:00
parent ac748d973c
commit 1a189ebdd7

View file

@ -103,6 +103,7 @@ static inline unsigned next_power_of_two(unsigned v) {
/**
\brief Return the position of the most significant bit.
*/
static inline unsigned log2(int v) { return std::bit_width((unsigned)v) - 1; }
static inline unsigned log2(unsigned v) { return std::bit_width(v) - 1; }
static inline unsigned log2(uint64_t v) { return std::bit_width(v) - 1; }