Wanted: CT-trait and run-time predicate for checking whether its single integer parameter is an exact power of two.

I guess

https://dlang.org/phobos/std_math.html#.truncPow2

or

https://dlang.org/phobos/std_math.html#.nextPow2

could be reused, but I bet there's a more efficient way of checking this.

Reply via email to