-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comparison to empty set returns false for set with no bits set. #71
Comments
Maybe define "is_empty()" |
I see how this could be unintuitive. |
Thanks. |
clarification: The number of 0s isn't part of the underlying implementation. Its already exposed via other methods. There is more discussion on this in #44. |
clarification: is_empty already exists but doesn't do what you want. No, it sure doesn't.
That's "is any storage allocated", not "are there any entries". The documentation does not say that. It needs to be made much, much clearer that "bitset" doesn't work like set theory, so that people are warned away from using it. |
Suggestions welcome, snark not appreciated 🤷 |
"Eq" is true only if the number of bits in the underlying representation is the same. Comparing a bitset against
FixedBitSet::new() is not necessarily true for the empty set.
The text was updated successfully, but these errors were encountered: