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

Create a heap abstraction similar in intent to std::priority_queue that doesn't require T to be copyable #56

Open
rambl30n opened this issue Feb 22, 2023 · 0 comments

Comments

@rambl30n
Copy link
Collaborator

While std::priority_queue can be instantiated with unique pointers, it isn't usable in practice, because of the way the top() and pop() methods interact with each other. This forces the user to either go the shared_ptr route (an overkill in many cases) or the raw pointer one, explicitly doing memory management on the application side, historically an error-prone endeavor. As neither of these alternatives is completely satisfactory, we should explore the possibility of a heap abstraction that resolves this conundrum.

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