Can't seem to alias BinaryHeap and use heapify

Enjoys Math via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 21 16:37:54 PDT 2015


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 scope (not in a function or ctor).

Error:
cannot pass type Array!(Results(int,float)) as a function 
argument.  When I add () to Array!(Results!(O,I)) I get some 
weird error in the library that can't be helped either.

Please guide me!


More information about the Digitalmars-d-learn mailing list