On Tuesday, 14 November 2017 at 04:13:16 UTC, Era Scarecrow wrote:
On Monday, 13 November 2017 at 16:26:20 UTC, balddenimhero
wrote:
In the course of writing a minimal example I removed more than
necessary in the previous pastebin (the passed IntOrder has
not even been used). Thus here is the corrected one:
https://pastebin.com/SKae08GT. I'm trying to port this to D.
Throwing together a sample involves wrapping the value in a
new value. Still the idea is put across...
Not sure if this is the best way to do this, but only takes a
little dereferencing to access the value.
Thanks for actually implementing the workaround you suggested on
the IRC for my minmal example. I'm using this for now as it seems
that using delegates as predicates is problematic in my use case.
It still feels kind of dirty though, and maybe I'll eventually
just implement a standard min-heap that is templated with a
comparator (as in C++).