Can't compile the code

bearophile bearophileHUGS at lycos.com
Sun Apr 28 11:40:19 PDT 2013


Ali Çehreli:

> The name of the parameter is omitted. Could have named it as 
> 'p':
>
>     auto f = (bool p = false) {};

OK. But is it syntactically allowed in D to omit the variable 
name when there is a default argument? I have never seen it 
before...

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list