function parameters: is it possible to pass byref ... while being optional at the same time ?
someone
someone at somewhere.com
Sat Jul 17 20:49:58 UTC 2021
The following gives me a compiler error when I add the second
parameter:
is not an lvalue and cannot be modified
```d
public bool add(
ref classTickerID robjTickerID,
ref classExchanges robjExchanges = null /// needing this
optional
) {
}
```
If I take out the null then the parameter is assumed mandatory of
course.
More information about the Digitalmars-d-learn
mailing list