out default argument of void
Jesse Phillips
Jessekphillips+D at gmail.com
Wed Jan 4 14:40:28 PST 2012
On Wednesday, 4 January 2012 at 22:19:28 UTC, Caligo wrote:
> 1. Are there any other solutions ?
> 2. Would it make sense to have 'out default argument of void'
> in D?
Out parameters are initialized. The declaration you want is:
bool fun(double theta, A a = A.init, B b = B.init, C c = C.init){
/* ... */ }
or, just overload the function for just taking theta.
If A, B, and C are classes then you can use null and not use
pointers.
More information about the Digitalmars-d-learn
mailing list