struct initializer
Paul Backus
snarwin at gmail.com
Wed Nov 29 17:32:09 UTC 2023
On Wednesday, 29 November 2023 at 17:23:04 UTC, Antonio wrote:
> On Wednesday, 29 November 2023 at 16:48:09 UTC, Paul Backus
> wrote:
>> ... it even supports named arguments:
>
> - Witch version of DMD supports named arguments? Is it an
> experimental compiler option?
I don't know what the earliest version is that supports it, but I
know the example I posted works in 2.105. It doesn't require any
compiler options.
Named arguments are still a work in progress, and there are some
situations where they aren't available (for example, I don't
think they work for templates yet). With struct literals, though,
you shouldn't have any problems using them.
More information about the Digitalmars-d-learn
mailing list