Boost logo

Boost :

Subject: Re: [boost] [review] Heaps
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2011-06-01 13:06:52


Den 01-06-2011 18:14, Tim Blechmann skrev:

>>> so i do not really see a specific use case, where one really wants to use
>>> a different container, or do you have a specific case?
>>
>> You might now the max size of your heap, and so you can make a simple
>> wrapper around an array. Other cases would be to use something like
>> stlsoft::auto_buffer.
>
> 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.

The same goes for flat_set/flat_map og circular_buffer, which I have
argued should have such an argument too.

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk