I need to dinamically calculate the necessary bits to hold unsigned integrals subsets of varied size, sum these results and construct a std::bitset based on the final result.

But I can't seem to find a way to solve ceil(log2(x)) with the standard library.

The problem is with the log2(x), since apparently only the common and natural logarithms are offered.

Am I failing to see some other function? Is there a mathematical equivalent equation I can use?