January 16, 2011 __traits(getMember, ...) on instance member | ||||
|---|---|---|---|---|
| ||||
Hi,
Something has been confusing me, regarding passing around aliases of instance members.
If I can say:
struct S { int m; }
pragma(msg, (S).m);
How come I can't say:
struct S { int m; }
pragma(msg, __traits(getMember, S, m));
?
What's the difference, and what does each one mean?
(I'm trying to create a MembersTuple(T) template that returns a tuple of all
members, but this stumbling block is pretty much fatal to my implementation.)
Thank you!
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply