function pointer and default argument

Ellery Newcomer ellery-newcomer at utulsa.edu
Wed Aug 22 11:51:45 PDT 2012


hey.

is this valid code?

void func1(int i, double j = 1.0) {
}

void main() {
     auto fn = &func1;
     func1(1); //dmd: ok
     fn(1); // dmd: not ok
}


More information about the Digitalmars-d-learn mailing list