BinaryHeap as member

2017-11-13 Thread balddenimhero via Digitalmars-d-learn
I need a priority queue of integers whose elements are not ordered by the default `opCmp` but some delegate. The following gist illustrates the problem I'm having: https://run.dlang.io/gist/92876b2c4d8c77cdc68f1ca61e7e8e44?compiler=dmd The `Foo` class is supposed to wrap a binary heap (to be us

Re: BinaryHeap as member

2017-11-13 Thread balddenimhero via Digitalmars-d-learn
On Monday, 13 November 2017 at 14:38:35 UTC, balddenimhero wrote: I need a priority queue of integers whose elements are not ordered by the default `opCmp` but some delegate. The following gist illustrates the problem I'm having: https://run.dlang.io/gist/92876b2c4d8c77cdc68f1ca61e7e8e44?compil

Re: BinaryHeap as member

2017-11-13 Thread balddenimhero via Digitalmars-d-learn
On Monday, 13 November 2017 at 15:43:35 UTC, balddenimhero wrote: On Monday, 13 November 2017 at 14:38:35 UTC, balddenimhero wrote: I need a priority queue of integers whose elements are not ordered by the default `opCmp` but some delegate. The following gist illustrates the problem I'm having

Re: BinaryHeap as member

2017-11-13 Thread Era Scarecrow via Digitalmars-d-learn
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 thi

Re: BinaryHeap as member

2017-11-14 Thread balddenimhero via Digitalmars-d-learn
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 c