Re: How can I use heapify in @safe code?

2016-10-01 Thread Burt via Digitalmars-d-learn
On Saturday, 1 October 2016 at 18:36:54 UTC, klmp wrote: On Saturday, 1 October 2016 at 16:59:18 UTC, Burt wrote: [...] It tries too but "heapify" uses the struct "BinaryHeap" that is not safe at all. (either not annotated or @safe not applicable because of what it uses in intern: @system

Re: How can I use heapify in @safe code?

2016-10-01 Thread klmp via Digitalmars-d-learn
On Saturday, 1 October 2016 at 16:59:18 UTC, Burt wrote: Hi, I'd like to use a binary heap from @safe code. I thought @safe is transitive It tries too but "heapify" uses the struct "BinaryHeap" that is not safe at all. (either not annotated or @safe not applicable because of what it uses in

How can I use heapify in @safe code?

2016-10-01 Thread Burt via Digitalmars-d-learn
Hi, I'd like to use a binary heap from @safe code. I thought @safe is transitive but the following example does not compile: import std.container.binaryheap; @safe // This makes things fail. unittest { // Test range interface. import std.algorithm.comparison : equal;