-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix paring heap UB #1747
base: master
Are you sure you want to change the base?
fix paring heap UB #1747
Conversation
73ae0c8
to
cbf7ccb
Compare
cbf7ccb
to
865289b
Compare
I'm not really in favor of this change as making the iteration over the heap nodes non-const can have severe side effects. e.g. by changing the node values that are used for comparison, which would result in corruption of the entire datastructure. I thought about this for a while and I think we should use a dedicated erasure method for |
Do you think it might be worth implementing an iterator for the tree? |
That would be cool! Currently we can get a problem with the recursion depth if the tree is too large. An iterator should solve that. |
a82c715
to
6b485a4
Compare
6b485a4
to
2668d9e
Compare
iterator added |
No description provided.