are std.traits.FieldNameTuple and std.traits.Fields returned value always in sync?

Stanislav Blinov stanislav.blinov at gmail.com
Mon Jun 22 20:08:37 UTC 2020


On Monday, 22 June 2020 at 19:55:29 UTC, mw wrote:

>> Yes, in the same order and of the same length.
>
> Can we add this information to the doc? to make it clear to the 
> user:
>
> https://dlang.org/library/std/traits.html

It's pretty clear in that doc already:

alias FieldNameTuple(T) = 
staticMap!(NameOf,T.tupleof[0..__dollar-isNested!T]);
alias Fields(T) = typeof(T.tupleof[0..__dollar-isNested!T]);

But if you'd like it spelled out in text as well, you can make a 
PR for the Phobos repository.


More information about the Digitalmars-d-learn mailing list