On Tue, 08 Jun 2010 12:26:19 -0400, Andrei Alexandrescu <[email protected]> wrote:


I agree that a BinaryHeap built on top of a container may ultimately affect the topology of the container, which makes it unlike e.g. Take or Chain. I could choose to disallow that and simply require that BinaryHeap always works on top of a range, not a container. But I think it's useful to have the growing functionality, and I don't think that makes BinaryHeap hopelessly confusing.

What about making a BinaryHeapRange and a BinaryHeapContainer (well, with better names)?

Essentially, the container flavored heap would use a BinaryHeapRange for its range type, and would supply the necessary functions for it to be a container.

I admit not reading any code for BinaryHeap, so this might just be a foolish suggestion...

-Steve

Reply via email to