Copy should make sure destination bitset has enough space
omerfirmak opened this issue · 1 comments
omerfirmak commented
Line 562 in 3821055
c.set
could be not large enough to hold the entire b.set
lemire commented
Here is what the function is documented as doing...
// Copy into a destination BitSet using the Go array copy semantics:
// the number of bits copied is the minimum of the number of bits in the current
// BitSet (Len()) and the destination Bitset.
// We return the number of bits copied in the destination BitSet.
If you believe that this behaviour is not followed, please provide a test case.
If you prefer, you can call CopyFull
which might what you are looking for.
Closing as "is as intended".