zoo
zoo copied to clipboard
Create a heap abstraction similar in intent to std::priority_queue that doesn't require T to be copyable
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.