invariants

  bool invariants() const;
  

This function checks the objects internal invariants and returns true if all are satisfied. If it returns false, it indicates a bug either in the bitvector implementation, or in client code. A common way to use this member is:

  assert(v.invariants());
  

Throws nothing.