BinaryHeap

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jun 1 19:09:02 PDT 2010


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


More information about the Digitalmars-d mailing list