Skip to content

Commit

Permalink
bitvec: resize is not constexpr -> neither is set/ctor(string_view)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohoch authored and felixguendling committed Jun 7, 2024
1 parent 9b0c8e3 commit f18217f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cista/containers/bitvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct basic_bitvec {
static_cast<size_type>(sizeof(block_t) * 8);

constexpr basic_bitvec() noexcept {}
constexpr basic_bitvec(std::string_view s) noexcept { set(s); }
basic_bitvec(std::string_view s) noexcept { set(s); }
constexpr basic_bitvec(Vec&& v) noexcept
: size_{v.size() * bits_per_block}, // inaccurate for loading mmap vector
blocks_{std::move(v)} {}
Expand Down Expand Up @@ -59,7 +59,7 @@ struct basic_bitvec {
size_ = new_size;
}

constexpr void set(std::string_view s) noexcept {
void set(std::string_view s) noexcept {
assert(std::all_of(begin(s), end(s),
[](char const c) { return c == '0' || c == '1'; }));
resize(s.size());
Expand Down

0 comments on commit f18217f

Please sign in to comment.