.stringof might call function?

simendsjo simendsjo at gmail.com
Sat Mar 16 06:01:43 PDT 2013


Why is the function called in the template at the line of 
.stringof?

template t(alias fn) {
     static if(fn.stringof) // f(int i) isn't callable using ()
         enum t = true;
     else
         enum t = false;
}

void main() {
     void f(int i) {}
     t!f;
}


More information about the Digitalmars-d-learn mailing list