
one could use a `container' argument similar to the std::priority_queue ... but i somehow like the way to pass the allocator as template argument (mainly for consistency among the different heaps) ... but of course, it would be possible to catch this at compile time ... so that either a container or an allocator is passed, but not both ...
Passing an allocator is not near as powerful a feature as passing the container.
nope ... but i would like to ensure the API consistency between node-based heaps and container-adaptors
Why? This is not exactly the same as defining a generic algorithm in terms of iterators. Lots of containers have different number of template arguments. I fail to see what benefits this "consistency" gives us.
a user who wants to find the best implementation for a specific application can simply replace the name ... my proposal above would imply that either a container or an allocator can be specified: give an allocator if you just want to use a custom allocator (consistent among all heaps) or give a container if you want to specify a custom container (consistent among container adaptors). whats wrong with this approach? tim