From 046989291e275d5e645b6d2c07e7b1f524fa962b Mon Sep 17 00:00:00 2001 From: Pablo Hoch Date: Tue, 22 Oct 2024 15:41:06 +0200 Subject: [PATCH] bitvec: add one_out() (#236) --- include/cista/containers/bitvec.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/cista/containers/bitvec.h b/include/cista/containers/bitvec.h index 529bbb85..66113ecf 100644 --- a/include/cista/containers/bitvec.h +++ b/include/cista/containers/bitvec.h @@ -53,6 +53,12 @@ struct basic_bitvec { } } + void one_out() { + for (auto& b : blocks_) { + b = ~block_t{0}; + } + } + void resize(size_type const new_size) { if (new_size == size_) { return;