P99

◆ p99_next_popcount()

uintmax_t p99_next_popcount ( uintmax_t  p00_x)
inline

function that returns the next higher value that has exactly the same popcount as x.

That is if x has K bits set in total, the result will be the smallest number that also has K bits set and that is greater than x.

Definition at line 1374 of file p99_int.h.

References uintmax_t.