I want to create a structure that allocates statically an array of 2^N bytes, but I don\'t want the users of this structure to specify this size as the exponent
These days, with constexpr and the bit twiddling hacks you can just
constexpr
constexpr bool is_powerof2(int v) { return v && ((v & (v - 1)) == 0); }