diff options
-rw-r--r-- | src/base/bitunion.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh index f640fa3b1..190c1a5e1 100644 --- a/src/base/bitunion.hh +++ b/src/base/bitunion.hh @@ -85,6 +85,9 @@ namespace BitfieldBackend template<int first, int last=first> class Bitfield : public BitfieldBase<Type> { + static_assert(first >= last, + "Bitfield ranges must be specified as <msb, lsb>"); + public: operator const uint64_t () const { |