Unordered Set gets messed up when created from a Vector

Not a bug; from UnorderedSet [Directory Opus Manual] :

the contents are not kept sorted (in fact, the order of set members is unspecified)

In other words, UnorderedSet is for when you don't care what order things are in. (It's usually more efficient than keeping them sorted.)

You might be confusing it with OrderedMap [Directory Opus Manual].

1 Like