A dynamically sized set of bits packed into 64-bit words. Used for component masks, free-slot tracking and dirty flags. Bits past size() are always zero, so whole-word operations (count, any, equality, bitwise ops) need no masking at the call site. A moved-from bit_vector is empty (size 0, no words) and fully reusable. Not thread-safe.
A dynamically sized set of bits packed into 64-bit words. Used for component masks, free-slot tracking and dirty flags. Bits past size() are always zero, so whole-word operations (count, any, equality, bitwise ops) need no masking at the call site. A moved-from bit_vector is empty (size 0, no words) and fully reusable. Not thread-safe.
Forward iterator over the indices of the set bits, ascending. Dereferencing yields the index by value, so it models std::forward_iterator (C++20) but only the legacy input iterator category, exactly like std::ranges::iota_view's iterator.
Range over the set bits: for (usize index: bits.set_bits()) { ... }. Its iterators refer to the bit_vector, not to the range object, so it is a borrowed range and std::ranges algorithms may take it by value: std::ranges::find(bits.set_bits(), 7).