On Thursday, 25 February 2016 at 04:55:09 UTC, Nicholas Wilson wrote:

oops should be
writeln(typeof(__traits(getMember, vulkan_input,  m)).stringof);
that compiles but still prints nothing

try

pragma(msg, typeof(__traits(getMember, vulkan_input, m)).stringof);

because at compile time the code generated for writeln() is not executed.

Also take care with the getMember trait, it will only work if the member is public. (or not public but located in the module where the __traits() code resides).

Reply via email to