I have this enum to get the type of a member field in a struct: enum typeOfMember(T, string member) = typeof(__traits(getMember, T, member));
I'm having problems when I try to used it though. For example:
writeln(typeOfMember!(T, member).stringof); // Doesn't work: Error: initializer must be an expression, not `int[]`
writeln(typeof(__traits(getMember, T, member)).stringof); // Expand the enum, it works.
What is the problem here? I'm using the LDC 1.27.1.