From ffef6fd66b4ebbd9e2f32d10b19c2b5218853626 Mon Sep 17 00:00:00 2001 From: seelabs Date: Thu, 3 Nov 2022 14:25:56 -0400 Subject: [PATCH] [fold] Add static assert for positive bits --- src/ripple/protocol/STBitString.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ripple/protocol/STBitString.h b/src/ripple/protocol/STBitString.h index fde210ad406..45d1a3d6f05 100644 --- a/src/ripple/protocol/STBitString.h +++ b/src/ripple/protocol/STBitString.h @@ -32,6 +32,8 @@ namespace ripple { template class STBitString final : public STBase { + static_assert(Bits > 0, "Number of bits must be positive"); + public: using value_type = base_uint;