stx-btree
stx-btree copied to clipboard
stx::btree_multimap equal_range doesn't work as expected
Impossible to iterate through all values of the same key using iterator returned by the equal_range method. I use stx-btree-dev 0.8.6-1 package from ubuntu 12.10. This code demonstrates the issue:
stx::btree_multimap<long long, long long> m;
for (long long i = 0; i < 1000L; i++) {
m.insert(0L, i);
}
auto pair = m.equal_range(0L);
long long count = 0L;
while(pair.first != pair.second) {
assert(pair.first->second == count++);
pair.first++;
}
Sorry, for not answering, I am drowning in other work, but I'll check it. Timo
@bingmann I opened another issue tree_map::erase(iterator ) compile revealing private member error #6, not sure how to assign to you:
:``` :iterator::currslot’ is private within this context [exec] 2778 | if (iter.currslot >= leaf->slotuse) [exec] | ~~~~~^~~~~~~~ [exec] In file included from /third_party/cpp/stx/btree_map.h:28, [exec] from /third_party/cpp/stx/btree_map:28,
[exec] /third_party/cpp/stx/btree.h:417:33: note: declared private here [exec] 417 | unsigned short currslot; [exec] | ^~~~~~~~ [exec] In file included from /third_party/cpp/stx/btree_map.h:28, [exec] from /third_party/cpp/stx/btree_map:28,