Skip to content

Commit

Permalink
Fix msvc warning
Browse files Browse the repository at this point in the history
  • Loading branch information
FAlbertDev committed Jan 11, 2024
1 parent c8863af commit 72775b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/utils/bitvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ class bitvector_base final {
* Sets all currently allocated bits.
*/
bitvector_base& set() {
full_range_operation([](std::unsigned_integral auto block) -> decltype(block) { return ~0; }, *this);
full_range_operation([](std::unsigned_integral auto block) -> decltype(block) { return ~decltype(block)(0); },
*this);
zero_unused_bits();
return *this;
}
Expand All @@ -453,7 +454,8 @@ class bitvector_base final {
* Unsets all currently allocated bits.
*/
bitvector_base& unset() {
full_range_operation([](std::unsigned_integral auto block) -> decltype(block) { return 0; }, *this);
full_range_operation([](std::unsigned_integral auto block) -> decltype(block) { return decltype(block)(0); },
*this);
return *this;
}

Expand Down

0 comments on commit 72775b2

Please sign in to comment.