On 8/4/15 9:02 PM, DarthCthulhu wrote:

     writefln("PQ: %s", pq.queue); <- prints PQ: [Tuple!(int, string)(3,
"HELLO3"), Tuple!(int, string)(10, "HELLO10"), Tuple!(int, string)(11,
"HELLO11")]

This is probably consuming your queue, popping all the data off as it prints. If you print the length before hand, I'll bet it's not zero.

I don't know how to print the elements without removing them, as binary heap doesn't have a range type, it seems to be the range itself (an odd situation). Perhaps print the underlying storage?

-Steve

Reply via email to