Skip to content

Commit

Permalink
[fold] Add static assert for positive bits
Browse files Browse the repository at this point in the history
  • Loading branch information
seelabs committed Nov 3, 2022
1 parent 5e8626a commit ffef6fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ripple/protocol/STBitString.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ namespace ripple {
template <int Bits>
class STBitString final : public STBase
{
static_assert(Bits > 0, "Number of bits must be positive");

public:
using value_type = base_uint<Bits>;

Expand Down

0 comments on commit ffef6fd

Please sign in to comment.