Daniel Murphy: > private struct privateint { int i; alias i this; }; > void foo(int x, privateint y = privateint(0)) > { > ... > } > > It's ugly, but should give reasonable error messages.
It looks like giving error messages if it's located in another module. And I agree, it's ugly. In real code for this problem I'll keep using the first solution, that is rely on convention and code comments (the static nested function approach too is too much hairy). Bye, bearophile