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

ordered iteration is wrong with duplicate keys #33

Open
llxxee opened this issue Jun 3, 2022 · 0 comments
Open

ordered iteration is wrong with duplicate keys #33

llxxee opened this issue Jun 3, 2022 · 0 comments

Comments

@llxxee
Copy link

llxxee commented Jun 3, 2022

To repro:
https://godbolt.org/z/jbK7nz37E

#include <iostream>
#include <boost/heap/binomial_heap.hpp>

int main()
{
  boost::heap::binomial_heap<int> heap;
  heap.push(100);
  heap.push(100);


  int count = 0;
  for (auto it = heap.ordered_begin();
        it != heap.ordered_end();
        ++it) {
    std::cout << *it << std::endl;
    count++;
  }

  // expected 2, got 3
  std::cout << count << std::endl;
}
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

1 participant