Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index 275dbb5cb21589b58db375485b61fcd552f16180..f4a0598c20368b1ae7e936d43196bd74f8e5f22f 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -36,7 +36,8 @@ namespace internal { |
// ---------------------------------------------------------------------------- |
// General helper functions |
-// Returns true iff x is a power of 2. Does not work for zero. |
+// Returns true iff x is a power of 2 (or zero). Cannot be used with the |
+// maximally negative value of the type T (the -1 overflows). |
template <typename T> |
static inline bool IsPowerOf2(T x) { |
return (x & (x - 1)) == 0; |