Re: how do I get only static member of a class?

2018-01-04 Thread Marc via Digitalmars-d-learn
On Thursday, 4 January 2018 at 00:02:24 UTC, Ali Çehreli wrote: On 01/03/2018 03:48 PM, Marc wrote: I found no way with __traits() on std.traits. I found isStaticFunction and isStaticArray but nothing about a member. Is this by desgin? Give a class like: class C { static int a, b, c; int

Re: how do I get only static member of a class?

2018-01-03 Thread Ali Çehreli via Digitalmars-d-learn
On 01/03/2018 03:48 PM, Marc wrote: I found no way with __traits() on std.traits. I found isStaticFunction and isStaticArray but nothing about a member. Is this by desgin? Give a class like: class C { static int a, b, c; int d; } I'd like to get a, b and c. I'm using this:

how do I get only static member of a class?

2018-01-03 Thread Marc via Digitalmars-d-learn
I found no way with __traits() on std.traits. I found isStaticFunction and isStaticArray but nothing about a member. Is this by desgin? Give a class like: class C { static int a, b, c; int d; } I'd like to get a, b and c. I'm using this: __traits(allMembers, C)