On Tuesday, 29 August 2017 at 15:48:05 UTC, Kagamin wrote:
You iterate over string literals: https://dlang.org/spec/traits.html#allMembers
I had known that, but I couldn't figure out how to get the identifiers. It turns out that I can loop over getOverloads and it produces the desired result (below).
module B; import A; void main() { import std.stdio : writeln; foreach(member; __traits(allMembers, A)) { foreach (t; __traits(getOverloads, A, member)) { writeln(__traits(getProtection, t)); } } }