C++ vs D: Default param values and struct to array casting

Paul Backus snarwin at gmail.com
Fri Sep 6 19:13:53 UTC 2019


On Friday, 6 September 2019 at 18:39:47 UTC, Andrew Edwards wrote:
>> also probably u can do https://run.dlang.io/is/WMQE93
>
> Ended up using this since it provides for named access and 
> solves the overloading requirement.
>
> Thanks,
> Andrew

You can also use std.typecons.Tuple for this, since it provides 
both named and indexed access:

https://run.dlang.io/is/bB21sX


More information about the Digitalmars-d-learn mailing list