Copies a regular Set into a set optimized for enumerations.
Depending on the enumeration size, different implementations may be returned.
enum class Foo { A, B, C,}val foo = setOf(Foo.A, Foo.B).toEnumSet()