Is there a nice syntax to achieve optional named parameters?
Kagamin
spam at here.lot
Fri Jan 18 13:49:48 UTC 2019
On Friday, 18 January 2019 at 09:39:31 UTC, John Burton wrote:
> It likely is a bad idea for a small struct like this but if it
> was much bigger would it makes sense to write this as :-
>
> this(const ref Config config)
>
> Which is what you might do in C++ or does D handle this
> differently?
For big Config struct it probably doesn't matter, but ref
parameters don't accept rvalues.
More information about the Digitalmars-d-learn
mailing list