
14 Jun
2013
14 Jun
'13
2:58 p.m.
Hello all, although it's called 'unordered_set', it surprised me that an unordered container could have a different ordering although its contents are the same: void f() { boost::unordered_set<int> uset1; uset1.insert(10); uset1.insert(9); uset1.insert(8); boost::unordered_set<int> uset2; uset2.insert(8); uset2.insert(9); uset2.insert(10); //uset1: 8, 9, 10 //uset2: 10, 9, 8 bool b = uset1 == uset2; //ok, they are the same } Maybe it is somewhere in the documentation, otherwise maybe add a documentation note.