Function isPowerOfTwo

Is power of 2

bool isPowerOfTwo(T) (
  T x
) nothrow;

Example

assert(isPowerOfTwo(16));
assert(!isPowerOfTwo(20));