I think I figured how to define BinaryHeap properly.

Currently BinaryHeap is parameterized by its storage support, which must be a random-access range.

It is easy to make BinaryHeap figure out whether its support is a random-access _container_ versus a random-access range. In the former case, it supports growing. Otherwise, the functionality remains as it is (the heap is bounded by the length of the range).

Container-parameterized code for the win!


Andrei

Reply via email to