How to use the result of __traits( allMembers , T ) with string mixins ?

Andrej Mitrovic via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Apr 28 08:45:21 PDT 2014


On 4/28/14, ParticlePeter via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> wrote:
> I found the code with parenthesis in the dlang __traits docs and
> also Philippe Sigauds "D Templates", and I haven't seen any other
> example which works without them. So, when to use which syntax (
> for which purpose ) ?

If you need to store the tuple as an array to some variable, then you
would use that syntax. It all depends on what you're trying to do from
the call site. Ultimately it won't matter much once we finally get a
proper 'static foreach' feature in D.


More information about the Digitalmars-d-learn mailing list