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,
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