Template not seeming to instantiate a second time with default alias parameter

wobbles via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 30 13:41:20 PDT 2016


Hi,

Code here:
https://gist.github.com/grogancolin/066a8a8c105fa473dfee961e2481a30e

Basically, it seems when a template has an alias parameter like

class Node(T, alias func = (T t => t*t))(){
//whatever
}

//instantiate
Node!(int) intNode;
Node!(float) floatNode;   // fails as lambda func expects an int.

Am I doing something wrong or is this a bug?


More information about the Digitalmars-d-learn mailing list