Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stx::btree_multimap equal_range doesn't work as expected #1

Open
Lazin opened this issue Jan 21, 2014 · 2 comments
Open

stx::btree_multimap equal_range doesn't work as expected #1

Lazin opened this issue Jan 21, 2014 · 2 comments
Assignees

Comments

@Lazin
Copy link

Lazin commented Jan 21, 2014

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++;
}
@bingmann
Copy link
Owner

Sorry, for not answering, I am drowning in other work, but I'll check it.
Timo

@bingmann bingmann self-assigned this Feb 11, 2014
@dunevolt
Copy link

dunevolt commented Sep 23, 2021

@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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants