digitalmars.D.bugs - [Issue 9502] New: std_container.BinaryHeap.pop?
- d-bugmail puremagic.com (23/23) Feb 12 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9502
http://d.puremagic.com/issues/show_bug.cgi?id=9502
Summary: std_container.BinaryHeap.pop?
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody puremagic.com
ReportedBy: bearophile_hugs eml.cc
A very common operation to do with a heap is to take the front item and remove
it from the heap:
auto item = heap.front;
heap.removeFront();
So maybe it's a good idea to add a handy short-named method that does both:
auto item = heap.pop();
This is useful in script-like D coding.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 12 2013








d-bugmail puremagic.com