Re: Can't seem to alias BinaryHeap and use heapify

2015-09-21 Thread Ali Çehreli via Digitalmars-d-learn
It is much more efficient if you can show the problem in minimal code. :) Here is minimal code that demonstrates the problem: import std.container; struct Results(O, I) {} bool compareResults(O, I)(Results!(O, I) lhs, Results!(O, I) rhs) { return lhs == rhs; } alias ProgramResultsQueue(O,

Can't seem to alias BinaryHeap and use heapify

2015-09-21 Thread Enjoys Math via Digitalmars-d-learn
I've got: alias ProgramResultsQueue(O,I) = BinaryHeap!(Array!(Results!(O,I)), compareResults); outside the class ProgramOptimizer. Inside the class I have: ProgramResultsQueue!(O,I) programResultsQ = heapify!(compareResults, Array!(Results!(O,I)))(Array!(Results!(O,I)), 0); at class scop