New library: argparse, for parsing CLI arguments

Andrey Zherikov andrey.zherikov at gmail.com
Thu Oct 14 14:01:50 UTC 2021


On Thursday, 14 October 2021 at 13:51:50 UTC, Paul Backus wrote:
> On Thursday, 14 October 2021 at 13:37:29 UTC, Andrey Zherikov 
> wrote:
>> Another thing is that I couldn't use `allMembers` without 
>> using the module name explicitly, because: `__traits(isModule, 
>> __MODULE__)` returns `false` and `__traits(allMembers, 
>> __MODULE__)` gives `"mymodule" can't have members,  "mymodule" 
>> must evaluate to either a module, a struct, an union, a class, 
>> an interface or a template instantiation`
>
> You can use `__traits(allMembers, mixin(__MODULE__))`.

How nice! Thanks!


More information about the Digitalmars-d-announce mailing list