Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index f95a136f96e6b0494057193d9f2da28e4faa8b86..a58439971f4c1f5ac291c7188a703a5b404946e3 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -305,8 +305,9 @@ class BitFieldBase { |
static T decode(U value) { |
return static_cast<T>((value & kMask) >> shift); |
} |
-}; |
+ STATIC_ASSERT((kNext - 1) / 8 < sizeof(U)); |
Jakob Kummerow
2016/08/17 15:47:01
How about:
STATIC_ASSERT(kNext / kBitsPerByte <=
|
+}; |
template <class T, int shift, int size> |
class BitField8 : public BitFieldBase<T, shift, size, uint8_t> {}; |