I'm a bit confused about how to properly use the Binary Heap
provided in std.container
. More specifically, I wanted to create a maximum heap of integers, so I tried writing
auto maxHeap = BinaryHeap!int();
and got a compiler complaint about int
not being sliceable with []. I've tried to read the documentation for it on Phobos, but I don't understand how to create a new, empty binary heap designed to store integers.
Could someone please lend me a hand?