Lymia / enumset

A library for compact bit sets containing enums.
Apache License 2.0
91 stars 35 forks source link

return value for insert() was inconsistent with std sets #13

Closed epavese closed 4 years ago

Lymia commented 4 years ago

I'll see about merging this change alongside whatever else I do next major release.

I'm torn between documenting this behavior with an explicit warning or changing it. If someone already relies on the return value of EnumSet::insert, this is a sneaky breaking change that will wreck their codebase.

epavese commented 4 years ago

Certainly breaking, yes. I only found it that way, by migrating some small sets to EnumSet

epavese commented 4 years ago

looking at it again, at least the result should be dual with remove(). That is very unintuitive otherwise.