Binary heap: obtain a _reference_ to the front of the heap

Johan Engelen via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 13 01:19:04 PDT 2016


In the binary heap documentation, I read that 
`BinaryHeap.front()` "Returns a copy of the front of the heap". 
[1]
Is there no function to access the front of the heap without a 
copy?  (micro-optimization)

Thanks,
   Johan

[1] 
https://dlang.org/phobos/std_container_binaryheap.html#.BinaryHeap.front


More information about the Digitalmars-d-learn mailing list