www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16072] New: std.container.binaryheap should be extendable for

https://issues.dlang.org/show_bug.cgi?id=16072

          Issue ID: 16072
           Summary: std.container.binaryheap should be extendable for
                    arrays
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

I don't see any reason why the following shouldn't work:

import std.container.binaryheap;
auto q = heapify!"a > b"([1, 4, 5]);
q.insert(2);

--
May 24 2016